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=46ba2afdb3ede88d0eb37df2726ab5ff33fb6983$
13 //
14
15 #include "libcef_dll/cpptoc/views/panel_cpptoc.h"
16 #include "libcef_dll/cpptoc/views/box_layout_cpptoc.h"
17 #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
18 #include "libcef_dll/cpptoc/views/button_cpptoc.h"
19 #include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
20 #include "libcef_dll/cpptoc/views/layout_cpptoc.h"
21 #include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
22 #include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
23 #include "libcef_dll/cpptoc/views/view_cpptoc.h"
24 #include "libcef_dll/cpptoc/views/window_cpptoc.h"
25 #include "libcef_dll/ctocpp/views/panel_delegate_ctocpp.h"
26 #include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
27 #include "libcef_dll/shutdown_checker.h"
28
29 // GLOBAL FUNCTIONS - Body may be edited by hand.
30
cef_panel_create(cef_panel_delegate_t * delegate)31 CEF_EXPORT cef_panel_t* cef_panel_create(cef_panel_delegate_t* delegate) {
32 shutdown_checker::AssertNotShutdown();
33
34 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
35
36 // Unverified params: delegate
37
38 // Execute
39 CefRefPtr<CefPanel> _retval =
40 CefPanel::CreatePanel(CefPanelDelegateCToCpp::Wrap(delegate));
41
42 // Return type: refptr_same
43 return CefPanelCppToC::Wrap(_retval);
44 }
45
46 namespace {
47
48 // MEMBER FUNCTIONS - Body may be edited by hand.
49
panel_as_window(struct _cef_panel_t * self)50 struct _cef_window_t* CEF_CALLBACK panel_as_window(struct _cef_panel_t* self) {
51 shutdown_checker::AssertNotShutdown();
52
53 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
54
55 DCHECK(self);
56 if (!self)
57 return NULL;
58
59 // Execute
60 CefRefPtr<CefWindow> _retval = CefPanelCppToC::Get(self)->AsWindow();
61
62 // Return type: refptr_same
63 return CefWindowCppToC::Wrap(_retval);
64 }
65
66 cef_fill_layout_t* CEF_CALLBACK
panel_set_to_fill_layout(struct _cef_panel_t * self)67 panel_set_to_fill_layout(struct _cef_panel_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 NULL;
75
76 // Execute
77 CefRefPtr<CefFillLayout> _retval =
78 CefPanelCppToC::Get(self)->SetToFillLayout();
79
80 // Return type: refptr_same
81 return CefFillLayoutCppToC::Wrap(_retval);
82 }
83
84 cef_box_layout_t* CEF_CALLBACK
panel_set_to_box_layout(struct _cef_panel_t * self,const struct _cef_box_layout_settings_t * settings)85 panel_set_to_box_layout(struct _cef_panel_t* self,
86 const struct _cef_box_layout_settings_t* settings) {
87 shutdown_checker::AssertNotShutdown();
88
89 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
90
91 DCHECK(self);
92 if (!self)
93 return NULL;
94 // Verify param: settings; type: struct_byref_const
95 DCHECK(settings);
96 if (!settings)
97 return NULL;
98
99 // Translate param: settings; type: struct_byref_const
100 CefBoxLayoutSettings settingsObj;
101 if (settings)
102 settingsObj.Set(*settings, false);
103
104 // Execute
105 CefRefPtr<CefBoxLayout> _retval =
106 CefPanelCppToC::Get(self)->SetToBoxLayout(settingsObj);
107
108 // Return type: refptr_same
109 return CefBoxLayoutCppToC::Wrap(_retval);
110 }
111
panel_get_layout(struct _cef_panel_t * self)112 cef_layout_t* CEF_CALLBACK panel_get_layout(struct _cef_panel_t* self) {
113 shutdown_checker::AssertNotShutdown();
114
115 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
116
117 DCHECK(self);
118 if (!self)
119 return NULL;
120
121 // Execute
122 CefRefPtr<CefLayout> _retval = CefPanelCppToC::Get(self)->GetLayout();
123
124 // Return type: refptr_same
125 return CefLayoutCppToC::Wrap(_retval);
126 }
127
panel_layout(struct _cef_panel_t * self)128 void CEF_CALLBACK panel_layout(struct _cef_panel_t* self) {
129 shutdown_checker::AssertNotShutdown();
130
131 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
132
133 DCHECK(self);
134 if (!self)
135 return;
136
137 // Execute
138 CefPanelCppToC::Get(self)->Layout();
139 }
140
panel_add_child_view(struct _cef_panel_t * self,struct _cef_view_t * view)141 void CEF_CALLBACK panel_add_child_view(struct _cef_panel_t* self,
142 struct _cef_view_t* view) {
143 shutdown_checker::AssertNotShutdown();
144
145 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
146
147 DCHECK(self);
148 if (!self)
149 return;
150 // Verify param: view; type: refptr_same
151 DCHECK(view);
152 if (!view)
153 return;
154
155 // Execute
156 CefPanelCppToC::Get(self)->AddChildView(CefViewCppToC::Unwrap(view));
157 }
158
panel_add_child_view_at(struct _cef_panel_t * self,struct _cef_view_t * view,int index)159 void CEF_CALLBACK panel_add_child_view_at(struct _cef_panel_t* self,
160 struct _cef_view_t* view,
161 int index) {
162 shutdown_checker::AssertNotShutdown();
163
164 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
165
166 DCHECK(self);
167 if (!self)
168 return;
169 // Verify param: view; type: refptr_same
170 DCHECK(view);
171 if (!view)
172 return;
173 // Verify param: index; type: simple_byval
174 DCHECK_GE(index, 0);
175 if (index < 0)
176 return;
177
178 // Execute
179 CefPanelCppToC::Get(self)->AddChildViewAt(CefViewCppToC::Unwrap(view), index);
180 }
181
panel_reorder_child_view(struct _cef_panel_t * self,struct _cef_view_t * view,int index)182 void CEF_CALLBACK panel_reorder_child_view(struct _cef_panel_t* self,
183 struct _cef_view_t* view,
184 int index) {
185 shutdown_checker::AssertNotShutdown();
186
187 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
188
189 DCHECK(self);
190 if (!self)
191 return;
192 // Verify param: view; type: refptr_same
193 DCHECK(view);
194 if (!view)
195 return;
196
197 // Execute
198 CefPanelCppToC::Get(self)->ReorderChildView(CefViewCppToC::Unwrap(view),
199 index);
200 }
201
panel_remove_child_view(struct _cef_panel_t * self,struct _cef_view_t * view)202 void CEF_CALLBACK panel_remove_child_view(struct _cef_panel_t* self,
203 struct _cef_view_t* view) {
204 shutdown_checker::AssertNotShutdown();
205
206 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
207
208 DCHECK(self);
209 if (!self)
210 return;
211 // Verify param: view; type: refptr_same
212 DCHECK(view);
213 if (!view)
214 return;
215
216 // Execute
217 CefPanelCppToC::Get(self)->RemoveChildView(CefViewCppToC::Unwrap(view));
218 }
219
panel_remove_all_child_views(struct _cef_panel_t * self)220 void CEF_CALLBACK panel_remove_all_child_views(struct _cef_panel_t* self) {
221 shutdown_checker::AssertNotShutdown();
222
223 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
224
225 DCHECK(self);
226 if (!self)
227 return;
228
229 // Execute
230 CefPanelCppToC::Get(self)->RemoveAllChildViews();
231 }
232
panel_get_child_view_count(struct _cef_panel_t * self)233 size_t CEF_CALLBACK panel_get_child_view_count(struct _cef_panel_t* self) {
234 shutdown_checker::AssertNotShutdown();
235
236 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
237
238 DCHECK(self);
239 if (!self)
240 return 0;
241
242 // Execute
243 size_t _retval = CefPanelCppToC::Get(self)->GetChildViewCount();
244
245 // Return type: simple
246 return _retval;
247 }
248
249 struct _cef_view_t* CEF_CALLBACK
panel_get_child_view_at(struct _cef_panel_t * self,int index)250 panel_get_child_view_at(struct _cef_panel_t* self, int index) {
251 shutdown_checker::AssertNotShutdown();
252
253 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
254
255 DCHECK(self);
256 if (!self)
257 return NULL;
258 // Verify param: index; type: simple_byval
259 DCHECK_GE(index, 0);
260 if (index < 0)
261 return NULL;
262
263 // Execute
264 CefRefPtr<CefView> _retval = CefPanelCppToC::Get(self)->GetChildViewAt(index);
265
266 // Return type: refptr_same
267 return CefViewCppToC::Wrap(_retval);
268 }
269
270 cef_browser_view_t* CEF_CALLBACK
panel_as_browser_view(struct _cef_view_t * self)271 panel_as_browser_view(struct _cef_view_t* self) {
272 shutdown_checker::AssertNotShutdown();
273
274 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
275
276 DCHECK(self);
277 if (!self)
278 return NULL;
279
280 // Execute
281 CefRefPtr<CefBrowserView> _retval =
282 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
283 ->AsBrowserView();
284
285 // Return type: refptr_same
286 return CefBrowserViewCppToC::Wrap(_retval);
287 }
288
panel_as_button(struct _cef_view_t * self)289 cef_button_t* CEF_CALLBACK panel_as_button(struct _cef_view_t* self) {
290 shutdown_checker::AssertNotShutdown();
291
292 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
293
294 DCHECK(self);
295 if (!self)
296 return NULL;
297
298 // Execute
299 CefRefPtr<CefButton> _retval =
300 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->AsButton();
301
302 // Return type: refptr_same
303 return CefButtonCppToC::Wrap(_retval);
304 }
305
panel_as_panel(struct _cef_view_t * self)306 cef_panel_t* CEF_CALLBACK panel_as_panel(struct _cef_view_t* self) {
307 shutdown_checker::AssertNotShutdown();
308
309 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
310
311 DCHECK(self);
312 if (!self)
313 return NULL;
314
315 // Execute
316 CefRefPtr<CefPanel> _retval =
317 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->AsPanel();
318
319 // Return type: refptr_same
320 return CefPanelCppToC::Wrap(_retval);
321 }
322
panel_as_scroll_view(struct _cef_view_t * self)323 cef_scroll_view_t* CEF_CALLBACK panel_as_scroll_view(struct _cef_view_t* self) {
324 shutdown_checker::AssertNotShutdown();
325
326 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
327
328 DCHECK(self);
329 if (!self)
330 return NULL;
331
332 // Execute
333 CefRefPtr<CefScrollView> _retval =
334 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->AsScrollView();
335
336 // Return type: refptr_same
337 return CefScrollViewCppToC::Wrap(_retval);
338 }
339
panel_as_textfield(struct _cef_view_t * self)340 cef_textfield_t* CEF_CALLBACK panel_as_textfield(struct _cef_view_t* self) {
341 shutdown_checker::AssertNotShutdown();
342
343 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
344
345 DCHECK(self);
346 if (!self)
347 return NULL;
348
349 // Execute
350 CefRefPtr<CefTextfield> _retval =
351 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->AsTextfield();
352
353 // Return type: refptr_same
354 return CefTextfieldCppToC::Wrap(_retval);
355 }
356
357 cef_string_userfree_t CEF_CALLBACK
panel_get_type_string(struct _cef_view_t * self)358 panel_get_type_string(struct _cef_view_t* self) {
359 shutdown_checker::AssertNotShutdown();
360
361 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
362
363 DCHECK(self);
364 if (!self)
365 return NULL;
366
367 // Execute
368 CefString _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
369 ->GetTypeString();
370
371 // Return type: string
372 return _retval.DetachToUserFree();
373 }
374
panel_to_string(struct _cef_view_t * self,int include_children)375 cef_string_userfree_t CEF_CALLBACK panel_to_string(struct _cef_view_t* self,
376 int include_children) {
377 shutdown_checker::AssertNotShutdown();
378
379 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
380
381 DCHECK(self);
382 if (!self)
383 return NULL;
384
385 // Execute
386 CefString _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
387 ->ToString(include_children ? true : false);
388
389 // Return type: string
390 return _retval.DetachToUserFree();
391 }
392
panel_is_valid(struct _cef_view_t * self)393 int CEF_CALLBACK panel_is_valid(struct _cef_view_t* self) {
394 shutdown_checker::AssertNotShutdown();
395
396 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
397
398 DCHECK(self);
399 if (!self)
400 return 0;
401
402 // Execute
403 bool _retval =
404 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->IsValid();
405
406 // Return type: bool
407 return _retval;
408 }
409
panel_is_attached(struct _cef_view_t * self)410 int CEF_CALLBACK panel_is_attached(struct _cef_view_t* self) {
411 shutdown_checker::AssertNotShutdown();
412
413 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
414
415 DCHECK(self);
416 if (!self)
417 return 0;
418
419 // Execute
420 bool _retval =
421 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->IsAttached();
422
423 // Return type: bool
424 return _retval;
425 }
426
panel_is_same(struct _cef_view_t * self,struct _cef_view_t * that)427 int CEF_CALLBACK panel_is_same(struct _cef_view_t* self,
428 struct _cef_view_t* that) {
429 shutdown_checker::AssertNotShutdown();
430
431 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
432
433 DCHECK(self);
434 if (!self)
435 return 0;
436 // Verify param: that; type: refptr_same
437 DCHECK(that);
438 if (!that)
439 return 0;
440
441 // Execute
442 bool _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
443 ->IsSame(CefViewCppToC::Unwrap(that));
444
445 // Return type: bool
446 return _retval;
447 }
448
449 struct _cef_view_delegate_t* CEF_CALLBACK
panel_get_delegate(struct _cef_view_t * self)450 panel_get_delegate(struct _cef_view_t* self) {
451 shutdown_checker::AssertNotShutdown();
452
453 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
454
455 DCHECK(self);
456 if (!self)
457 return NULL;
458
459 // Execute
460 CefRefPtr<CefViewDelegate> _retval =
461 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetDelegate();
462
463 // Return type: refptr_diff
464 return CefViewDelegateCToCpp::Unwrap(_retval);
465 }
466
panel_get_window(struct _cef_view_t * self)467 struct _cef_window_t* CEF_CALLBACK panel_get_window(struct _cef_view_t* self) {
468 shutdown_checker::AssertNotShutdown();
469
470 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
471
472 DCHECK(self);
473 if (!self)
474 return NULL;
475
476 // Execute
477 CefRefPtr<CefWindow> _retval =
478 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetWindow();
479
480 // Return type: refptr_same
481 return CefWindowCppToC::Wrap(_retval);
482 }
483
panel_get_id(struct _cef_view_t * self)484 int CEF_CALLBACK panel_get_id(struct _cef_view_t* self) {
485 shutdown_checker::AssertNotShutdown();
486
487 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
488
489 DCHECK(self);
490 if (!self)
491 return 0;
492
493 // Execute
494 int _retval =
495 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetID();
496
497 // Return type: simple
498 return _retval;
499 }
500
panel_set_id(struct _cef_view_t * self,int id)501 void CEF_CALLBACK panel_set_id(struct _cef_view_t* self, int id) {
502 shutdown_checker::AssertNotShutdown();
503
504 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
505
506 DCHECK(self);
507 if (!self)
508 return;
509
510 // Execute
511 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->SetID(id);
512 }
513
panel_get_group_id(struct _cef_view_t * self)514 int CEF_CALLBACK panel_get_group_id(struct _cef_view_t* self) {
515 shutdown_checker::AssertNotShutdown();
516
517 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
518
519 DCHECK(self);
520 if (!self)
521 return 0;
522
523 // Execute
524 int _retval =
525 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetGroupID();
526
527 // Return type: simple
528 return _retval;
529 }
530
panel_set_group_id(struct _cef_view_t * self,int group_id)531 void CEF_CALLBACK panel_set_group_id(struct _cef_view_t* self, int group_id) {
532 shutdown_checker::AssertNotShutdown();
533
534 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
535
536 DCHECK(self);
537 if (!self)
538 return;
539
540 // Execute
541 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
542 ->SetGroupID(group_id);
543 }
544
545 struct _cef_view_t* CEF_CALLBACK
panel_get_parent_view(struct _cef_view_t * self)546 panel_get_parent_view(struct _cef_view_t* self) {
547 shutdown_checker::AssertNotShutdown();
548
549 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
550
551 DCHECK(self);
552 if (!self)
553 return NULL;
554
555 // Execute
556 CefRefPtr<CefView> _retval =
557 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
558 ->GetParentView();
559
560 // Return type: refptr_same
561 return CefViewCppToC::Wrap(_retval);
562 }
563
panel_get_view_for_id(struct _cef_view_t * self,int id)564 struct _cef_view_t* CEF_CALLBACK panel_get_view_for_id(struct _cef_view_t* self,
565 int id) {
566 shutdown_checker::AssertNotShutdown();
567
568 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
569
570 DCHECK(self);
571 if (!self)
572 return NULL;
573
574 // Execute
575 CefRefPtr<CefView> _retval =
576 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
577 ->GetViewForID(id);
578
579 // Return type: refptr_same
580 return CefViewCppToC::Wrap(_retval);
581 }
582
panel_set_bounds(struct _cef_view_t * self,const cef_rect_t * bounds)583 void CEF_CALLBACK panel_set_bounds(struct _cef_view_t* self,
584 const cef_rect_t* bounds) {
585 shutdown_checker::AssertNotShutdown();
586
587 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
588
589 DCHECK(self);
590 if (!self)
591 return;
592 // Verify param: bounds; type: simple_byref_const
593 DCHECK(bounds);
594 if (!bounds)
595 return;
596
597 // Translate param: bounds; type: simple_byref_const
598 CefRect boundsVal = bounds ? *bounds : CefRect();
599
600 // Execute
601 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
602 ->SetBounds(boundsVal);
603 }
604
panel_get_bounds(struct _cef_view_t * self)605 cef_rect_t CEF_CALLBACK panel_get_bounds(struct _cef_view_t* self) {
606 shutdown_checker::AssertNotShutdown();
607
608 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
609
610 DCHECK(self);
611 if (!self)
612 return CefRect();
613
614 // Execute
615 cef_rect_t _retval =
616 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetBounds();
617
618 // Return type: simple
619 return _retval;
620 }
621
panel_get_bounds_in_screen(struct _cef_view_t * self)622 cef_rect_t CEF_CALLBACK panel_get_bounds_in_screen(struct _cef_view_t* self) {
623 shutdown_checker::AssertNotShutdown();
624
625 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
626
627 DCHECK(self);
628 if (!self)
629 return CefRect();
630
631 // Execute
632 cef_rect_t _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
633 ->GetBoundsInScreen();
634
635 // Return type: simple
636 return _retval;
637 }
638
panel_set_size(struct _cef_view_t * self,const cef_size_t * size)639 void CEF_CALLBACK panel_set_size(struct _cef_view_t* self,
640 const cef_size_t* size) {
641 shutdown_checker::AssertNotShutdown();
642
643 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
644
645 DCHECK(self);
646 if (!self)
647 return;
648 // Verify param: size; type: simple_byref_const
649 DCHECK(size);
650 if (!size)
651 return;
652
653 // Translate param: size; type: simple_byref_const
654 CefSize sizeVal = size ? *size : CefSize();
655
656 // Execute
657 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->SetSize(sizeVal);
658 }
659
panel_get_size(struct _cef_view_t * self)660 cef_size_t CEF_CALLBACK panel_get_size(struct _cef_view_t* self) {
661 shutdown_checker::AssertNotShutdown();
662
663 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
664
665 DCHECK(self);
666 if (!self)
667 return CefSize();
668
669 // Execute
670 cef_size_t _retval =
671 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetSize();
672
673 // Return type: simple
674 return _retval;
675 }
676
panel_set_position(struct _cef_view_t * self,const cef_point_t * position)677 void CEF_CALLBACK panel_set_position(struct _cef_view_t* self,
678 const cef_point_t* position) {
679 shutdown_checker::AssertNotShutdown();
680
681 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
682
683 DCHECK(self);
684 if (!self)
685 return;
686 // Verify param: position; type: simple_byref_const
687 DCHECK(position);
688 if (!position)
689 return;
690
691 // Translate param: position; type: simple_byref_const
692 CefPoint positionVal = position ? *position : CefPoint();
693
694 // Execute
695 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
696 ->SetPosition(positionVal);
697 }
698
panel_get_position(struct _cef_view_t * self)699 cef_point_t CEF_CALLBACK panel_get_position(struct _cef_view_t* self) {
700 shutdown_checker::AssertNotShutdown();
701
702 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
703
704 DCHECK(self);
705 if (!self)
706 return CefPoint();
707
708 // Execute
709 cef_point_t _retval =
710 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->GetPosition();
711
712 // Return type: simple
713 return _retval;
714 }
715
panel_get_preferred_size(struct _cef_view_t * self)716 cef_size_t CEF_CALLBACK panel_get_preferred_size(struct _cef_view_t* self) {
717 shutdown_checker::AssertNotShutdown();
718
719 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
720
721 DCHECK(self);
722 if (!self)
723 return CefSize();
724
725 // Execute
726 cef_size_t _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
727 ->GetPreferredSize();
728
729 // Return type: simple
730 return _retval;
731 }
732
panel_size_to_preferred_size(struct _cef_view_t * self)733 void CEF_CALLBACK panel_size_to_preferred_size(struct _cef_view_t* self) {
734 shutdown_checker::AssertNotShutdown();
735
736 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
737
738 DCHECK(self);
739 if (!self)
740 return;
741
742 // Execute
743 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
744 ->SizeToPreferredSize();
745 }
746
panel_get_minimum_size(struct _cef_view_t * self)747 cef_size_t CEF_CALLBACK panel_get_minimum_size(struct _cef_view_t* self) {
748 shutdown_checker::AssertNotShutdown();
749
750 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
751
752 DCHECK(self);
753 if (!self)
754 return CefSize();
755
756 // Execute
757 cef_size_t _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
758 ->GetMinimumSize();
759
760 // Return type: simple
761 return _retval;
762 }
763
panel_get_maximum_size(struct _cef_view_t * self)764 cef_size_t CEF_CALLBACK panel_get_maximum_size(struct _cef_view_t* self) {
765 shutdown_checker::AssertNotShutdown();
766
767 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
768
769 DCHECK(self);
770 if (!self)
771 return CefSize();
772
773 // Execute
774 cef_size_t _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
775 ->GetMaximumSize();
776
777 // Return type: simple
778 return _retval;
779 }
780
panel_get_height_for_width(struct _cef_view_t * self,int width)781 int CEF_CALLBACK panel_get_height_for_width(struct _cef_view_t* self,
782 int width) {
783 shutdown_checker::AssertNotShutdown();
784
785 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
786
787 DCHECK(self);
788 if (!self)
789 return 0;
790
791 // Execute
792 int _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
793 ->GetHeightForWidth(width);
794
795 // Return type: simple
796 return _retval;
797 }
798
panel_invalidate_layout(struct _cef_view_t * self)799 void CEF_CALLBACK panel_invalidate_layout(struct _cef_view_t* self) {
800 shutdown_checker::AssertNotShutdown();
801
802 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
803
804 DCHECK(self);
805 if (!self)
806 return;
807
808 // Execute
809 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->InvalidateLayout();
810 }
811
panel_set_visible(struct _cef_view_t * self,int visible)812 void CEF_CALLBACK panel_set_visible(struct _cef_view_t* self, int visible) {
813 shutdown_checker::AssertNotShutdown();
814
815 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
816
817 DCHECK(self);
818 if (!self)
819 return;
820
821 // Execute
822 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
823 ->SetVisible(visible ? true : false);
824 }
825
panel_is_visible(struct _cef_view_t * self)826 int CEF_CALLBACK panel_is_visible(struct _cef_view_t* self) {
827 shutdown_checker::AssertNotShutdown();
828
829 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
830
831 DCHECK(self);
832 if (!self)
833 return 0;
834
835 // Execute
836 bool _retval =
837 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->IsVisible();
838
839 // Return type: bool
840 return _retval;
841 }
842
panel_is_drawn(struct _cef_view_t * self)843 int CEF_CALLBACK panel_is_drawn(struct _cef_view_t* self) {
844 shutdown_checker::AssertNotShutdown();
845
846 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
847
848 DCHECK(self);
849 if (!self)
850 return 0;
851
852 // Execute
853 bool _retval =
854 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->IsDrawn();
855
856 // Return type: bool
857 return _retval;
858 }
859
panel_set_enabled(struct _cef_view_t * self,int enabled)860 void CEF_CALLBACK panel_set_enabled(struct _cef_view_t* self, int enabled) {
861 shutdown_checker::AssertNotShutdown();
862
863 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
864
865 DCHECK(self);
866 if (!self)
867 return;
868
869 // Execute
870 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
871 ->SetEnabled(enabled ? true : false);
872 }
873
panel_is_enabled(struct _cef_view_t * self)874 int CEF_CALLBACK panel_is_enabled(struct _cef_view_t* self) {
875 shutdown_checker::AssertNotShutdown();
876
877 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
878
879 DCHECK(self);
880 if (!self)
881 return 0;
882
883 // Execute
884 bool _retval =
885 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->IsEnabled();
886
887 // Return type: bool
888 return _retval;
889 }
890
panel_set_focusable(struct _cef_view_t * self,int focusable)891 void CEF_CALLBACK panel_set_focusable(struct _cef_view_t* self, int focusable) {
892 shutdown_checker::AssertNotShutdown();
893
894 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
895
896 DCHECK(self);
897 if (!self)
898 return;
899
900 // Execute
901 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
902 ->SetFocusable(focusable ? true : false);
903 }
904
panel_is_focusable(struct _cef_view_t * self)905 int CEF_CALLBACK panel_is_focusable(struct _cef_view_t* self) {
906 shutdown_checker::AssertNotShutdown();
907
908 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
909
910 DCHECK(self);
911 if (!self)
912 return 0;
913
914 // Execute
915 bool _retval =
916 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->IsFocusable();
917
918 // Return type: bool
919 return _retval;
920 }
921
panel_is_accessibility_focusable(struct _cef_view_t * self)922 int CEF_CALLBACK panel_is_accessibility_focusable(struct _cef_view_t* self) {
923 shutdown_checker::AssertNotShutdown();
924
925 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
926
927 DCHECK(self);
928 if (!self)
929 return 0;
930
931 // Execute
932 bool _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
933 ->IsAccessibilityFocusable();
934
935 // Return type: bool
936 return _retval;
937 }
938
panel_request_focus(struct _cef_view_t * self)939 void CEF_CALLBACK panel_request_focus(struct _cef_view_t* self) {
940 shutdown_checker::AssertNotShutdown();
941
942 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
943
944 DCHECK(self);
945 if (!self)
946 return;
947
948 // Execute
949 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))->RequestFocus();
950 }
951
panel_set_background_color(struct _cef_view_t * self,cef_color_t color)952 void CEF_CALLBACK panel_set_background_color(struct _cef_view_t* self,
953 cef_color_t color) {
954 shutdown_checker::AssertNotShutdown();
955
956 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
957
958 DCHECK(self);
959 if (!self)
960 return;
961
962 // Execute
963 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
964 ->SetBackgroundColor(color);
965 }
966
panel_get_background_color(struct _cef_view_t * self)967 cef_color_t CEF_CALLBACK panel_get_background_color(struct _cef_view_t* self) {
968 shutdown_checker::AssertNotShutdown();
969
970 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
971
972 DCHECK(self);
973 if (!self)
974 return 0;
975
976 // Execute
977 cef_color_t _retval =
978 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
979 ->GetBackgroundColor();
980
981 // Return type: simple
982 return _retval;
983 }
984
panel_convert_point_to_screen(struct _cef_view_t * self,cef_point_t * point)985 int CEF_CALLBACK panel_convert_point_to_screen(struct _cef_view_t* self,
986 cef_point_t* point) {
987 shutdown_checker::AssertNotShutdown();
988
989 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
990
991 DCHECK(self);
992 if (!self)
993 return 0;
994 // Verify param: point; type: simple_byref
995 DCHECK(point);
996 if (!point)
997 return 0;
998
999 // Translate param: point; type: simple_byref
1000 CefPoint pointVal = point ? *point : CefPoint();
1001
1002 // Execute
1003 bool _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
1004 ->ConvertPointToScreen(pointVal);
1005
1006 // Restore param: point; type: simple_byref
1007 if (point)
1008 *point = pointVal;
1009
1010 // Return type: bool
1011 return _retval;
1012 }
1013
panel_convert_point_from_screen(struct _cef_view_t * self,cef_point_t * point)1014 int CEF_CALLBACK panel_convert_point_from_screen(struct _cef_view_t* self,
1015 cef_point_t* point) {
1016 shutdown_checker::AssertNotShutdown();
1017
1018 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1019
1020 DCHECK(self);
1021 if (!self)
1022 return 0;
1023 // Verify param: point; type: simple_byref
1024 DCHECK(point);
1025 if (!point)
1026 return 0;
1027
1028 // Translate param: point; type: simple_byref
1029 CefPoint pointVal = point ? *point : CefPoint();
1030
1031 // Execute
1032 bool _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
1033 ->ConvertPointFromScreen(pointVal);
1034
1035 // Restore param: point; type: simple_byref
1036 if (point)
1037 *point = pointVal;
1038
1039 // Return type: bool
1040 return _retval;
1041 }
1042
panel_convert_point_to_window(struct _cef_view_t * self,cef_point_t * point)1043 int CEF_CALLBACK panel_convert_point_to_window(struct _cef_view_t* self,
1044 cef_point_t* point) {
1045 shutdown_checker::AssertNotShutdown();
1046
1047 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1048
1049 DCHECK(self);
1050 if (!self)
1051 return 0;
1052 // Verify param: point; type: simple_byref
1053 DCHECK(point);
1054 if (!point)
1055 return 0;
1056
1057 // Translate param: point; type: simple_byref
1058 CefPoint pointVal = point ? *point : CefPoint();
1059
1060 // Execute
1061 bool _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
1062 ->ConvertPointToWindow(pointVal);
1063
1064 // Restore param: point; type: simple_byref
1065 if (point)
1066 *point = pointVal;
1067
1068 // Return type: bool
1069 return _retval;
1070 }
1071
panel_convert_point_from_window(struct _cef_view_t * self,cef_point_t * point)1072 int CEF_CALLBACK panel_convert_point_from_window(struct _cef_view_t* self,
1073 cef_point_t* point) {
1074 shutdown_checker::AssertNotShutdown();
1075
1076 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1077
1078 DCHECK(self);
1079 if (!self)
1080 return 0;
1081 // Verify param: point; type: simple_byref
1082 DCHECK(point);
1083 if (!point)
1084 return 0;
1085
1086 // Translate param: point; type: simple_byref
1087 CefPoint pointVal = point ? *point : CefPoint();
1088
1089 // Execute
1090 bool _retval = CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
1091 ->ConvertPointFromWindow(pointVal);
1092
1093 // Restore param: point; type: simple_byref
1094 if (point)
1095 *point = pointVal;
1096
1097 // Return type: bool
1098 return _retval;
1099 }
1100
panel_convert_point_to_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)1101 int CEF_CALLBACK panel_convert_point_to_view(struct _cef_view_t* self,
1102 struct _cef_view_t* view,
1103 cef_point_t* point) {
1104 shutdown_checker::AssertNotShutdown();
1105
1106 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1107
1108 DCHECK(self);
1109 if (!self)
1110 return 0;
1111 // Verify param: view; type: refptr_same
1112 DCHECK(view);
1113 if (!view)
1114 return 0;
1115 // Verify param: point; type: simple_byref
1116 DCHECK(point);
1117 if (!point)
1118 return 0;
1119
1120 // Translate param: point; type: simple_byref
1121 CefPoint pointVal = point ? *point : CefPoint();
1122
1123 // Execute
1124 bool _retval =
1125 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
1126 ->ConvertPointToView(CefViewCppToC::Unwrap(view), pointVal);
1127
1128 // Restore param: point; type: simple_byref
1129 if (point)
1130 *point = pointVal;
1131
1132 // Return type: bool
1133 return _retval;
1134 }
1135
panel_convert_point_from_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)1136 int CEF_CALLBACK panel_convert_point_from_view(struct _cef_view_t* self,
1137 struct _cef_view_t* view,
1138 cef_point_t* point) {
1139 shutdown_checker::AssertNotShutdown();
1140
1141 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1142
1143 DCHECK(self);
1144 if (!self)
1145 return 0;
1146 // Verify param: view; type: refptr_same
1147 DCHECK(view);
1148 if (!view)
1149 return 0;
1150 // Verify param: point; type: simple_byref
1151 DCHECK(point);
1152 if (!point)
1153 return 0;
1154
1155 // Translate param: point; type: simple_byref
1156 CefPoint pointVal = point ? *point : CefPoint();
1157
1158 // Execute
1159 bool _retval =
1160 CefPanelCppToC::Get(reinterpret_cast<cef_panel_t*>(self))
1161 ->ConvertPointFromView(CefViewCppToC::Unwrap(view), pointVal);
1162
1163 // Restore param: point; type: simple_byref
1164 if (point)
1165 *point = pointVal;
1166
1167 // Return type: bool
1168 return _retval;
1169 }
1170
1171 } // namespace
1172
1173 // CONSTRUCTOR - Do not edit by hand.
1174
CefPanelCppToC()1175 CefPanelCppToC::CefPanelCppToC() {
1176 GetStruct()->as_window = panel_as_window;
1177 GetStruct()->set_to_fill_layout = panel_set_to_fill_layout;
1178 GetStruct()->set_to_box_layout = panel_set_to_box_layout;
1179 GetStruct()->get_layout = panel_get_layout;
1180 GetStruct()->layout = panel_layout;
1181 GetStruct()->add_child_view = panel_add_child_view;
1182 GetStruct()->add_child_view_at = panel_add_child_view_at;
1183 GetStruct()->reorder_child_view = panel_reorder_child_view;
1184 GetStruct()->remove_child_view = panel_remove_child_view;
1185 GetStruct()->remove_all_child_views = panel_remove_all_child_views;
1186 GetStruct()->get_child_view_count = panel_get_child_view_count;
1187 GetStruct()->get_child_view_at = panel_get_child_view_at;
1188 GetStruct()->base.as_browser_view = panel_as_browser_view;
1189 GetStruct()->base.as_button = panel_as_button;
1190 GetStruct()->base.as_panel = panel_as_panel;
1191 GetStruct()->base.as_scroll_view = panel_as_scroll_view;
1192 GetStruct()->base.as_textfield = panel_as_textfield;
1193 GetStruct()->base.get_type_string = panel_get_type_string;
1194 GetStruct()->base.to_string = panel_to_string;
1195 GetStruct()->base.is_valid = panel_is_valid;
1196 GetStruct()->base.is_attached = panel_is_attached;
1197 GetStruct()->base.is_same = panel_is_same;
1198 GetStruct()->base.get_delegate = panel_get_delegate;
1199 GetStruct()->base.get_window = panel_get_window;
1200 GetStruct()->base.get_id = panel_get_id;
1201 GetStruct()->base.set_id = panel_set_id;
1202 GetStruct()->base.get_group_id = panel_get_group_id;
1203 GetStruct()->base.set_group_id = panel_set_group_id;
1204 GetStruct()->base.get_parent_view = panel_get_parent_view;
1205 GetStruct()->base.get_view_for_id = panel_get_view_for_id;
1206 GetStruct()->base.set_bounds = panel_set_bounds;
1207 GetStruct()->base.get_bounds = panel_get_bounds;
1208 GetStruct()->base.get_bounds_in_screen = panel_get_bounds_in_screen;
1209 GetStruct()->base.set_size = panel_set_size;
1210 GetStruct()->base.get_size = panel_get_size;
1211 GetStruct()->base.set_position = panel_set_position;
1212 GetStruct()->base.get_position = panel_get_position;
1213 GetStruct()->base.get_preferred_size = panel_get_preferred_size;
1214 GetStruct()->base.size_to_preferred_size = panel_size_to_preferred_size;
1215 GetStruct()->base.get_minimum_size = panel_get_minimum_size;
1216 GetStruct()->base.get_maximum_size = panel_get_maximum_size;
1217 GetStruct()->base.get_height_for_width = panel_get_height_for_width;
1218 GetStruct()->base.invalidate_layout = panel_invalidate_layout;
1219 GetStruct()->base.set_visible = panel_set_visible;
1220 GetStruct()->base.is_visible = panel_is_visible;
1221 GetStruct()->base.is_drawn = panel_is_drawn;
1222 GetStruct()->base.set_enabled = panel_set_enabled;
1223 GetStruct()->base.is_enabled = panel_is_enabled;
1224 GetStruct()->base.set_focusable = panel_set_focusable;
1225 GetStruct()->base.is_focusable = panel_is_focusable;
1226 GetStruct()->base.is_accessibility_focusable =
1227 panel_is_accessibility_focusable;
1228 GetStruct()->base.request_focus = panel_request_focus;
1229 GetStruct()->base.set_background_color = panel_set_background_color;
1230 GetStruct()->base.get_background_color = panel_get_background_color;
1231 GetStruct()->base.convert_point_to_screen = panel_convert_point_to_screen;
1232 GetStruct()->base.convert_point_from_screen = panel_convert_point_from_screen;
1233 GetStruct()->base.convert_point_to_window = panel_convert_point_to_window;
1234 GetStruct()->base.convert_point_from_window = panel_convert_point_from_window;
1235 GetStruct()->base.convert_point_to_view = panel_convert_point_to_view;
1236 GetStruct()->base.convert_point_from_view = panel_convert_point_from_view;
1237 }
1238
1239 // DESTRUCTOR - Do not edit by hand.
1240
~CefPanelCppToC()1241 CefPanelCppToC::~CefPanelCppToC() {
1242 shutdown_checker::AssertNotShutdown();
1243 }
1244
1245 template <>
1246 CefRefPtr<CefPanel>
UnwrapDerived(CefWrapperType type,cef_panel_t * s)1247 CefCppToCRefCounted<CefPanelCppToC, CefPanel, cef_panel_t>::UnwrapDerived(
1248 CefWrapperType type,
1249 cef_panel_t* s) {
1250 if (type == WT_WINDOW) {
1251 return CefWindowCppToC::Unwrap(reinterpret_cast<cef_window_t*>(s));
1252 }
1253 NOTREACHED() << "Unexpected class type: " << type;
1254 return nullptr;
1255 }
1256
1257 template <>
1258 CefWrapperType
1259 CefCppToCRefCounted<CefPanelCppToC, CefPanel, cef_panel_t>::kWrapperType =
1260 WT_PANEL;
1261