• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2022 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=48694fa56762351ccd3369dca9e679efbda61160$
13 //
14 
15 #include "libcef_dll/cpptoc/views/view_cpptoc.h"
16 #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
17 #include "libcef_dll/cpptoc/views/button_cpptoc.h"
18 #include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
19 #include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
20 #include "libcef_dll/cpptoc/views/panel_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/window_cpptoc.h"
24 #include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
25 #include "libcef_dll/shutdown_checker.h"
26 
27 namespace {
28 
29 // MEMBER FUNCTIONS - Body may be edited by hand.
30 
31 cef_browser_view_t* CEF_CALLBACK
view_as_browser_view(struct _cef_view_t * self)32 view_as_browser_view(struct _cef_view_t* self) {
33   shutdown_checker::AssertNotShutdown();
34 
35   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
36 
37   DCHECK(self);
38   if (!self)
39     return NULL;
40 
41   // Execute
42   CefRefPtr<CefBrowserView> _retval = CefViewCppToC::Get(self)->AsBrowserView();
43 
44   // Return type: refptr_same
45   return CefBrowserViewCppToC::Wrap(_retval);
46 }
47 
view_as_button(struct _cef_view_t * self)48 cef_button_t* CEF_CALLBACK view_as_button(struct _cef_view_t* self) {
49   shutdown_checker::AssertNotShutdown();
50 
51   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
52 
53   DCHECK(self);
54   if (!self)
55     return NULL;
56 
57   // Execute
58   CefRefPtr<CefButton> _retval = CefViewCppToC::Get(self)->AsButton();
59 
60   // Return type: refptr_same
61   return CefButtonCppToC::Wrap(_retval);
62 }
63 
view_as_panel(struct _cef_view_t * self)64 cef_panel_t* CEF_CALLBACK view_as_panel(struct _cef_view_t* self) {
65   shutdown_checker::AssertNotShutdown();
66 
67   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
68 
69   DCHECK(self);
70   if (!self)
71     return NULL;
72 
73   // Execute
74   CefRefPtr<CefPanel> _retval = CefViewCppToC::Get(self)->AsPanel();
75 
76   // Return type: refptr_same
77   return CefPanelCppToC::Wrap(_retval);
78 }
79 
view_as_scroll_view(struct _cef_view_t * self)80 cef_scroll_view_t* CEF_CALLBACK view_as_scroll_view(struct _cef_view_t* self) {
81   shutdown_checker::AssertNotShutdown();
82 
83   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
84 
85   DCHECK(self);
86   if (!self)
87     return NULL;
88 
89   // Execute
90   CefRefPtr<CefScrollView> _retval = CefViewCppToC::Get(self)->AsScrollView();
91 
92   // Return type: refptr_same
93   return CefScrollViewCppToC::Wrap(_retval);
94 }
95 
view_as_textfield(struct _cef_view_t * self)96 cef_textfield_t* CEF_CALLBACK view_as_textfield(struct _cef_view_t* self) {
97   shutdown_checker::AssertNotShutdown();
98 
99   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
100 
101   DCHECK(self);
102   if (!self)
103     return NULL;
104 
105   // Execute
106   CefRefPtr<CefTextfield> _retval = CefViewCppToC::Get(self)->AsTextfield();
107 
108   // Return type: refptr_same
109   return CefTextfieldCppToC::Wrap(_retval);
110 }
111 
112 cef_string_userfree_t CEF_CALLBACK
view_get_type_string(struct _cef_view_t * self)113 view_get_type_string(struct _cef_view_t* self) {
114   shutdown_checker::AssertNotShutdown();
115 
116   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
117 
118   DCHECK(self);
119   if (!self)
120     return NULL;
121 
122   // Execute
123   CefString _retval = CefViewCppToC::Get(self)->GetTypeString();
124 
125   // Return type: string
126   return _retval.DetachToUserFree();
127 }
128 
view_to_string(struct _cef_view_t * self,int include_children)129 cef_string_userfree_t CEF_CALLBACK view_to_string(struct _cef_view_t* self,
130                                                   int include_children) {
131   shutdown_checker::AssertNotShutdown();
132 
133   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
134 
135   DCHECK(self);
136   if (!self)
137     return NULL;
138 
139   // Execute
140   CefString _retval =
141       CefViewCppToC::Get(self)->ToString(include_children ? true : false);
142 
143   // Return type: string
144   return _retval.DetachToUserFree();
145 }
146 
view_is_valid(struct _cef_view_t * self)147 int CEF_CALLBACK view_is_valid(struct _cef_view_t* self) {
148   shutdown_checker::AssertNotShutdown();
149 
150   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
151 
152   DCHECK(self);
153   if (!self)
154     return 0;
155 
156   // Execute
157   bool _retval = CefViewCppToC::Get(self)->IsValid();
158 
159   // Return type: bool
160   return _retval;
161 }
162 
view_is_attached(struct _cef_view_t * self)163 int CEF_CALLBACK view_is_attached(struct _cef_view_t* self) {
164   shutdown_checker::AssertNotShutdown();
165 
166   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
167 
168   DCHECK(self);
169   if (!self)
170     return 0;
171 
172   // Execute
173   bool _retval = CefViewCppToC::Get(self)->IsAttached();
174 
175   // Return type: bool
176   return _retval;
177 }
178 
view_is_same(struct _cef_view_t * self,struct _cef_view_t * that)179 int CEF_CALLBACK view_is_same(struct _cef_view_t* self,
180                               struct _cef_view_t* that) {
181   shutdown_checker::AssertNotShutdown();
182 
183   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
184 
185   DCHECK(self);
186   if (!self)
187     return 0;
188   // Verify param: that; type: refptr_same
189   DCHECK(that);
190   if (!that)
191     return 0;
192 
193   // Execute
194   bool _retval = CefViewCppToC::Get(self)->IsSame(CefViewCppToC::Unwrap(that));
195 
196   // Return type: bool
197   return _retval;
198 }
199 
200 struct _cef_view_delegate_t* CEF_CALLBACK
view_get_delegate(struct _cef_view_t * self)201 view_get_delegate(struct _cef_view_t* self) {
202   shutdown_checker::AssertNotShutdown();
203 
204   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
205 
206   DCHECK(self);
207   if (!self)
208     return NULL;
209 
210   // Execute
211   CefRefPtr<CefViewDelegate> _retval = CefViewCppToC::Get(self)->GetDelegate();
212 
213   // Return type: refptr_diff
214   return CefViewDelegateCToCpp::Unwrap(_retval);
215 }
216 
view_get_window(struct _cef_view_t * self)217 struct _cef_window_t* CEF_CALLBACK view_get_window(struct _cef_view_t* self) {
218   shutdown_checker::AssertNotShutdown();
219 
220   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
221 
222   DCHECK(self);
223   if (!self)
224     return NULL;
225 
226   // Execute
227   CefRefPtr<CefWindow> _retval = CefViewCppToC::Get(self)->GetWindow();
228 
229   // Return type: refptr_same
230   return CefWindowCppToC::Wrap(_retval);
231 }
232 
view_get_id(struct _cef_view_t * self)233 int CEF_CALLBACK view_get_id(struct _cef_view_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   int _retval = CefViewCppToC::Get(self)->GetID();
244 
245   // Return type: simple
246   return _retval;
247 }
248 
view_set_id(struct _cef_view_t * self,int id)249 void CEF_CALLBACK view_set_id(struct _cef_view_t* self, int id) {
250   shutdown_checker::AssertNotShutdown();
251 
252   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
253 
254   DCHECK(self);
255   if (!self)
256     return;
257 
258   // Execute
259   CefViewCppToC::Get(self)->SetID(id);
260 }
261 
view_get_group_id(struct _cef_view_t * self)262 int CEF_CALLBACK view_get_group_id(struct _cef_view_t* self) {
263   shutdown_checker::AssertNotShutdown();
264 
265   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
266 
267   DCHECK(self);
268   if (!self)
269     return 0;
270 
271   // Execute
272   int _retval = CefViewCppToC::Get(self)->GetGroupID();
273 
274   // Return type: simple
275   return _retval;
276 }
277 
view_set_group_id(struct _cef_view_t * self,int group_id)278 void CEF_CALLBACK view_set_group_id(struct _cef_view_t* self, int group_id) {
279   shutdown_checker::AssertNotShutdown();
280 
281   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
282 
283   DCHECK(self);
284   if (!self)
285     return;
286 
287   // Execute
288   CefViewCppToC::Get(self)->SetGroupID(group_id);
289 }
290 
291 struct _cef_view_t* CEF_CALLBACK
view_get_parent_view(struct _cef_view_t * self)292 view_get_parent_view(struct _cef_view_t* self) {
293   shutdown_checker::AssertNotShutdown();
294 
295   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
296 
297   DCHECK(self);
298   if (!self)
299     return NULL;
300 
301   // Execute
302   CefRefPtr<CefView> _retval = CefViewCppToC::Get(self)->GetParentView();
303 
304   // Return type: refptr_same
305   return CefViewCppToC::Wrap(_retval);
306 }
307 
view_get_view_for_id(struct _cef_view_t * self,int id)308 struct _cef_view_t* CEF_CALLBACK view_get_view_for_id(struct _cef_view_t* self,
309                                                       int id) {
310   shutdown_checker::AssertNotShutdown();
311 
312   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
313 
314   DCHECK(self);
315   if (!self)
316     return NULL;
317 
318   // Execute
319   CefRefPtr<CefView> _retval = CefViewCppToC::Get(self)->GetViewForID(id);
320 
321   // Return type: refptr_same
322   return CefViewCppToC::Wrap(_retval);
323 }
324 
view_set_bounds(struct _cef_view_t * self,const cef_rect_t * bounds)325 void CEF_CALLBACK view_set_bounds(struct _cef_view_t* self,
326                                   const cef_rect_t* bounds) {
327   shutdown_checker::AssertNotShutdown();
328 
329   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
330 
331   DCHECK(self);
332   if (!self)
333     return;
334   // Verify param: bounds; type: simple_byref_const
335   DCHECK(bounds);
336   if (!bounds)
337     return;
338 
339   // Translate param: bounds; type: simple_byref_const
340   CefRect boundsVal = bounds ? *bounds : CefRect();
341 
342   // Execute
343   CefViewCppToC::Get(self)->SetBounds(boundsVal);
344 }
345 
view_get_bounds(struct _cef_view_t * self)346 cef_rect_t CEF_CALLBACK view_get_bounds(struct _cef_view_t* self) {
347   shutdown_checker::AssertNotShutdown();
348 
349   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
350 
351   DCHECK(self);
352   if (!self)
353     return CefRect();
354 
355   // Execute
356   cef_rect_t _retval = CefViewCppToC::Get(self)->GetBounds();
357 
358   // Return type: simple
359   return _retval;
360 }
361 
view_get_bounds_in_screen(struct _cef_view_t * self)362 cef_rect_t CEF_CALLBACK view_get_bounds_in_screen(struct _cef_view_t* self) {
363   shutdown_checker::AssertNotShutdown();
364 
365   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
366 
367   DCHECK(self);
368   if (!self)
369     return CefRect();
370 
371   // Execute
372   cef_rect_t _retval = CefViewCppToC::Get(self)->GetBoundsInScreen();
373 
374   // Return type: simple
375   return _retval;
376 }
377 
view_set_size(struct _cef_view_t * self,const cef_size_t * size)378 void CEF_CALLBACK view_set_size(struct _cef_view_t* self,
379                                 const cef_size_t* size) {
380   shutdown_checker::AssertNotShutdown();
381 
382   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
383 
384   DCHECK(self);
385   if (!self)
386     return;
387   // Verify param: size; type: simple_byref_const
388   DCHECK(size);
389   if (!size)
390     return;
391 
392   // Translate param: size; type: simple_byref_const
393   CefSize sizeVal = size ? *size : CefSize();
394 
395   // Execute
396   CefViewCppToC::Get(self)->SetSize(sizeVal);
397 }
398 
view_get_size(struct _cef_view_t * self)399 cef_size_t CEF_CALLBACK view_get_size(struct _cef_view_t* self) {
400   shutdown_checker::AssertNotShutdown();
401 
402   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
403 
404   DCHECK(self);
405   if (!self)
406     return CefSize();
407 
408   // Execute
409   cef_size_t _retval = CefViewCppToC::Get(self)->GetSize();
410 
411   // Return type: simple
412   return _retval;
413 }
414 
view_set_position(struct _cef_view_t * self,const cef_point_t * position)415 void CEF_CALLBACK view_set_position(struct _cef_view_t* self,
416                                     const cef_point_t* position) {
417   shutdown_checker::AssertNotShutdown();
418 
419   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
420 
421   DCHECK(self);
422   if (!self)
423     return;
424   // Verify param: position; type: simple_byref_const
425   DCHECK(position);
426   if (!position)
427     return;
428 
429   // Translate param: position; type: simple_byref_const
430   CefPoint positionVal = position ? *position : CefPoint();
431 
432   // Execute
433   CefViewCppToC::Get(self)->SetPosition(positionVal);
434 }
435 
view_get_position(struct _cef_view_t * self)436 cef_point_t CEF_CALLBACK view_get_position(struct _cef_view_t* self) {
437   shutdown_checker::AssertNotShutdown();
438 
439   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
440 
441   DCHECK(self);
442   if (!self)
443     return CefPoint();
444 
445   // Execute
446   cef_point_t _retval = CefViewCppToC::Get(self)->GetPosition();
447 
448   // Return type: simple
449   return _retval;
450 }
451 
view_set_insets(struct _cef_view_t * self,const cef_insets_t * insets)452 void CEF_CALLBACK view_set_insets(struct _cef_view_t* self,
453                                   const cef_insets_t* insets) {
454   shutdown_checker::AssertNotShutdown();
455 
456   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
457 
458   DCHECK(self);
459   if (!self)
460     return;
461   // Verify param: insets; type: simple_byref_const
462   DCHECK(insets);
463   if (!insets)
464     return;
465 
466   // Translate param: insets; type: simple_byref_const
467   CefInsets insetsVal = insets ? *insets : CefInsets();
468 
469   // Execute
470   CefViewCppToC::Get(self)->SetInsets(insetsVal);
471 }
472 
view_get_insets(struct _cef_view_t * self)473 cef_insets_t CEF_CALLBACK view_get_insets(struct _cef_view_t* self) {
474   shutdown_checker::AssertNotShutdown();
475 
476   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
477 
478   DCHECK(self);
479   if (!self)
480     return CefInsets();
481 
482   // Execute
483   cef_insets_t _retval = CefViewCppToC::Get(self)->GetInsets();
484 
485   // Return type: simple
486   return _retval;
487 }
488 
view_get_preferred_size(struct _cef_view_t * self)489 cef_size_t CEF_CALLBACK view_get_preferred_size(struct _cef_view_t* self) {
490   shutdown_checker::AssertNotShutdown();
491 
492   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
493 
494   DCHECK(self);
495   if (!self)
496     return CefSize();
497 
498   // Execute
499   cef_size_t _retval = CefViewCppToC::Get(self)->GetPreferredSize();
500 
501   // Return type: simple
502   return _retval;
503 }
504 
view_size_to_preferred_size(struct _cef_view_t * self)505 void CEF_CALLBACK view_size_to_preferred_size(struct _cef_view_t* self) {
506   shutdown_checker::AssertNotShutdown();
507 
508   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
509 
510   DCHECK(self);
511   if (!self)
512     return;
513 
514   // Execute
515   CefViewCppToC::Get(self)->SizeToPreferredSize();
516 }
517 
view_get_minimum_size(struct _cef_view_t * self)518 cef_size_t CEF_CALLBACK view_get_minimum_size(struct _cef_view_t* self) {
519   shutdown_checker::AssertNotShutdown();
520 
521   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
522 
523   DCHECK(self);
524   if (!self)
525     return CefSize();
526 
527   // Execute
528   cef_size_t _retval = CefViewCppToC::Get(self)->GetMinimumSize();
529 
530   // Return type: simple
531   return _retval;
532 }
533 
view_get_maximum_size(struct _cef_view_t * self)534 cef_size_t CEF_CALLBACK view_get_maximum_size(struct _cef_view_t* self) {
535   shutdown_checker::AssertNotShutdown();
536 
537   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
538 
539   DCHECK(self);
540   if (!self)
541     return CefSize();
542 
543   // Execute
544   cef_size_t _retval = CefViewCppToC::Get(self)->GetMaximumSize();
545 
546   // Return type: simple
547   return _retval;
548 }
549 
view_get_height_for_width(struct _cef_view_t * self,int width)550 int CEF_CALLBACK view_get_height_for_width(struct _cef_view_t* self,
551                                            int width) {
552   shutdown_checker::AssertNotShutdown();
553 
554   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
555 
556   DCHECK(self);
557   if (!self)
558     return 0;
559 
560   // Execute
561   int _retval = CefViewCppToC::Get(self)->GetHeightForWidth(width);
562 
563   // Return type: simple
564   return _retval;
565 }
566 
view_invalidate_layout(struct _cef_view_t * self)567 void CEF_CALLBACK view_invalidate_layout(struct _cef_view_t* self) {
568   shutdown_checker::AssertNotShutdown();
569 
570   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
571 
572   DCHECK(self);
573   if (!self)
574     return;
575 
576   // Execute
577   CefViewCppToC::Get(self)->InvalidateLayout();
578 }
579 
view_set_visible(struct _cef_view_t * self,int visible)580 void CEF_CALLBACK view_set_visible(struct _cef_view_t* self, int visible) {
581   shutdown_checker::AssertNotShutdown();
582 
583   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
584 
585   DCHECK(self);
586   if (!self)
587     return;
588 
589   // Execute
590   CefViewCppToC::Get(self)->SetVisible(visible ? true : false);
591 }
592 
view_is_visible(struct _cef_view_t * self)593 int CEF_CALLBACK view_is_visible(struct _cef_view_t* self) {
594   shutdown_checker::AssertNotShutdown();
595 
596   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
597 
598   DCHECK(self);
599   if (!self)
600     return 0;
601 
602   // Execute
603   bool _retval = CefViewCppToC::Get(self)->IsVisible();
604 
605   // Return type: bool
606   return _retval;
607 }
608 
view_is_drawn(struct _cef_view_t * self)609 int CEF_CALLBACK view_is_drawn(struct _cef_view_t* self) {
610   shutdown_checker::AssertNotShutdown();
611 
612   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
613 
614   DCHECK(self);
615   if (!self)
616     return 0;
617 
618   // Execute
619   bool _retval = CefViewCppToC::Get(self)->IsDrawn();
620 
621   // Return type: bool
622   return _retval;
623 }
624 
view_set_enabled(struct _cef_view_t * self,int enabled)625 void CEF_CALLBACK view_set_enabled(struct _cef_view_t* self, int enabled) {
626   shutdown_checker::AssertNotShutdown();
627 
628   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
629 
630   DCHECK(self);
631   if (!self)
632     return;
633 
634   // Execute
635   CefViewCppToC::Get(self)->SetEnabled(enabled ? true : false);
636 }
637 
view_is_enabled(struct _cef_view_t * self)638 int CEF_CALLBACK view_is_enabled(struct _cef_view_t* self) {
639   shutdown_checker::AssertNotShutdown();
640 
641   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
642 
643   DCHECK(self);
644   if (!self)
645     return 0;
646 
647   // Execute
648   bool _retval = CefViewCppToC::Get(self)->IsEnabled();
649 
650   // Return type: bool
651   return _retval;
652 }
653 
view_set_focusable(struct _cef_view_t * self,int focusable)654 void CEF_CALLBACK view_set_focusable(struct _cef_view_t* self, int focusable) {
655   shutdown_checker::AssertNotShutdown();
656 
657   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
658 
659   DCHECK(self);
660   if (!self)
661     return;
662 
663   // Execute
664   CefViewCppToC::Get(self)->SetFocusable(focusable ? true : false);
665 }
666 
view_is_focusable(struct _cef_view_t * self)667 int CEF_CALLBACK view_is_focusable(struct _cef_view_t* self) {
668   shutdown_checker::AssertNotShutdown();
669 
670   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
671 
672   DCHECK(self);
673   if (!self)
674     return 0;
675 
676   // Execute
677   bool _retval = CefViewCppToC::Get(self)->IsFocusable();
678 
679   // Return type: bool
680   return _retval;
681 }
682 
view_is_accessibility_focusable(struct _cef_view_t * self)683 int CEF_CALLBACK view_is_accessibility_focusable(struct _cef_view_t* self) {
684   shutdown_checker::AssertNotShutdown();
685 
686   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
687 
688   DCHECK(self);
689   if (!self)
690     return 0;
691 
692   // Execute
693   bool _retval = CefViewCppToC::Get(self)->IsAccessibilityFocusable();
694 
695   // Return type: bool
696   return _retval;
697 }
698 
view_request_focus(struct _cef_view_t * self)699 void CEF_CALLBACK view_request_focus(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;
707 
708   // Execute
709   CefViewCppToC::Get(self)->RequestFocus();
710 }
711 
view_set_background_color(struct _cef_view_t * self,cef_color_t color)712 void CEF_CALLBACK view_set_background_color(struct _cef_view_t* self,
713                                             cef_color_t color) {
714   shutdown_checker::AssertNotShutdown();
715 
716   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
717 
718   DCHECK(self);
719   if (!self)
720     return;
721 
722   // Execute
723   CefViewCppToC::Get(self)->SetBackgroundColor(color);
724 }
725 
view_get_background_color(struct _cef_view_t * self)726 cef_color_t CEF_CALLBACK view_get_background_color(struct _cef_view_t* self) {
727   shutdown_checker::AssertNotShutdown();
728 
729   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
730 
731   DCHECK(self);
732   if (!self)
733     return 0;
734 
735   // Execute
736   cef_color_t _retval = CefViewCppToC::Get(self)->GetBackgroundColor();
737 
738   // Return type: simple
739   return _retval;
740 }
741 
view_convert_point_to_screen(struct _cef_view_t * self,cef_point_t * point)742 int CEF_CALLBACK view_convert_point_to_screen(struct _cef_view_t* self,
743                                               cef_point_t* point) {
744   shutdown_checker::AssertNotShutdown();
745 
746   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
747 
748   DCHECK(self);
749   if (!self)
750     return 0;
751   // Verify param: point; type: simple_byref
752   DCHECK(point);
753   if (!point)
754     return 0;
755 
756   // Translate param: point; type: simple_byref
757   CefPoint pointVal = point ? *point : CefPoint();
758 
759   // Execute
760   bool _retval = CefViewCppToC::Get(self)->ConvertPointToScreen(pointVal);
761 
762   // Restore param: point; type: simple_byref
763   if (point)
764     *point = pointVal;
765 
766   // Return type: bool
767   return _retval;
768 }
769 
view_convert_point_from_screen(struct _cef_view_t * self,cef_point_t * point)770 int CEF_CALLBACK view_convert_point_from_screen(struct _cef_view_t* self,
771                                                 cef_point_t* point) {
772   shutdown_checker::AssertNotShutdown();
773 
774   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
775 
776   DCHECK(self);
777   if (!self)
778     return 0;
779   // Verify param: point; type: simple_byref
780   DCHECK(point);
781   if (!point)
782     return 0;
783 
784   // Translate param: point; type: simple_byref
785   CefPoint pointVal = point ? *point : CefPoint();
786 
787   // Execute
788   bool _retval = CefViewCppToC::Get(self)->ConvertPointFromScreen(pointVal);
789 
790   // Restore param: point; type: simple_byref
791   if (point)
792     *point = pointVal;
793 
794   // Return type: bool
795   return _retval;
796 }
797 
view_convert_point_to_window(struct _cef_view_t * self,cef_point_t * point)798 int CEF_CALLBACK view_convert_point_to_window(struct _cef_view_t* self,
799                                               cef_point_t* point) {
800   shutdown_checker::AssertNotShutdown();
801 
802   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
803 
804   DCHECK(self);
805   if (!self)
806     return 0;
807   // Verify param: point; type: simple_byref
808   DCHECK(point);
809   if (!point)
810     return 0;
811 
812   // Translate param: point; type: simple_byref
813   CefPoint pointVal = point ? *point : CefPoint();
814 
815   // Execute
816   bool _retval = CefViewCppToC::Get(self)->ConvertPointToWindow(pointVal);
817 
818   // Restore param: point; type: simple_byref
819   if (point)
820     *point = pointVal;
821 
822   // Return type: bool
823   return _retval;
824 }
825 
view_convert_point_from_window(struct _cef_view_t * self,cef_point_t * point)826 int CEF_CALLBACK view_convert_point_from_window(struct _cef_view_t* self,
827                                                 cef_point_t* point) {
828   shutdown_checker::AssertNotShutdown();
829 
830   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
831 
832   DCHECK(self);
833   if (!self)
834     return 0;
835   // Verify param: point; type: simple_byref
836   DCHECK(point);
837   if (!point)
838     return 0;
839 
840   // Translate param: point; type: simple_byref
841   CefPoint pointVal = point ? *point : CefPoint();
842 
843   // Execute
844   bool _retval = CefViewCppToC::Get(self)->ConvertPointFromWindow(pointVal);
845 
846   // Restore param: point; type: simple_byref
847   if (point)
848     *point = pointVal;
849 
850   // Return type: bool
851   return _retval;
852 }
853 
view_convert_point_to_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)854 int CEF_CALLBACK view_convert_point_to_view(struct _cef_view_t* self,
855                                             struct _cef_view_t* view,
856                                             cef_point_t* point) {
857   shutdown_checker::AssertNotShutdown();
858 
859   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
860 
861   DCHECK(self);
862   if (!self)
863     return 0;
864   // Verify param: view; type: refptr_same
865   DCHECK(view);
866   if (!view)
867     return 0;
868   // Verify param: point; type: simple_byref
869   DCHECK(point);
870   if (!point)
871     return 0;
872 
873   // Translate param: point; type: simple_byref
874   CefPoint pointVal = point ? *point : CefPoint();
875 
876   // Execute
877   bool _retval = CefViewCppToC::Get(self)->ConvertPointToView(
878       CefViewCppToC::Unwrap(view), pointVal);
879 
880   // Restore param: point; type: simple_byref
881   if (point)
882     *point = pointVal;
883 
884   // Return type: bool
885   return _retval;
886 }
887 
view_convert_point_from_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)888 int CEF_CALLBACK view_convert_point_from_view(struct _cef_view_t* self,
889                                               struct _cef_view_t* view,
890                                               cef_point_t* point) {
891   shutdown_checker::AssertNotShutdown();
892 
893   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
894 
895   DCHECK(self);
896   if (!self)
897     return 0;
898   // Verify param: view; type: refptr_same
899   DCHECK(view);
900   if (!view)
901     return 0;
902   // Verify param: point; type: simple_byref
903   DCHECK(point);
904   if (!point)
905     return 0;
906 
907   // Translate param: point; type: simple_byref
908   CefPoint pointVal = point ? *point : CefPoint();
909 
910   // Execute
911   bool _retval = CefViewCppToC::Get(self)->ConvertPointFromView(
912       CefViewCppToC::Unwrap(view), pointVal);
913 
914   // Restore param: point; type: simple_byref
915   if (point)
916     *point = pointVal;
917 
918   // Return type: bool
919   return _retval;
920 }
921 
922 }  // namespace
923 
924 // CONSTRUCTOR - Do not edit by hand.
925 
CefViewCppToC()926 CefViewCppToC::CefViewCppToC() {
927   GetStruct()->as_browser_view = view_as_browser_view;
928   GetStruct()->as_button = view_as_button;
929   GetStruct()->as_panel = view_as_panel;
930   GetStruct()->as_scroll_view = view_as_scroll_view;
931   GetStruct()->as_textfield = view_as_textfield;
932   GetStruct()->get_type_string = view_get_type_string;
933   GetStruct()->to_string = view_to_string;
934   GetStruct()->is_valid = view_is_valid;
935   GetStruct()->is_attached = view_is_attached;
936   GetStruct()->is_same = view_is_same;
937   GetStruct()->get_delegate = view_get_delegate;
938   GetStruct()->get_window = view_get_window;
939   GetStruct()->get_id = view_get_id;
940   GetStruct()->set_id = view_set_id;
941   GetStruct()->get_group_id = view_get_group_id;
942   GetStruct()->set_group_id = view_set_group_id;
943   GetStruct()->get_parent_view = view_get_parent_view;
944   GetStruct()->get_view_for_id = view_get_view_for_id;
945   GetStruct()->set_bounds = view_set_bounds;
946   GetStruct()->get_bounds = view_get_bounds;
947   GetStruct()->get_bounds_in_screen = view_get_bounds_in_screen;
948   GetStruct()->set_size = view_set_size;
949   GetStruct()->get_size = view_get_size;
950   GetStruct()->set_position = view_set_position;
951   GetStruct()->get_position = view_get_position;
952   GetStruct()->set_insets = view_set_insets;
953   GetStruct()->get_insets = view_get_insets;
954   GetStruct()->get_preferred_size = view_get_preferred_size;
955   GetStruct()->size_to_preferred_size = view_size_to_preferred_size;
956   GetStruct()->get_minimum_size = view_get_minimum_size;
957   GetStruct()->get_maximum_size = view_get_maximum_size;
958   GetStruct()->get_height_for_width = view_get_height_for_width;
959   GetStruct()->invalidate_layout = view_invalidate_layout;
960   GetStruct()->set_visible = view_set_visible;
961   GetStruct()->is_visible = view_is_visible;
962   GetStruct()->is_drawn = view_is_drawn;
963   GetStruct()->set_enabled = view_set_enabled;
964   GetStruct()->is_enabled = view_is_enabled;
965   GetStruct()->set_focusable = view_set_focusable;
966   GetStruct()->is_focusable = view_is_focusable;
967   GetStruct()->is_accessibility_focusable = view_is_accessibility_focusable;
968   GetStruct()->request_focus = view_request_focus;
969   GetStruct()->set_background_color = view_set_background_color;
970   GetStruct()->get_background_color = view_get_background_color;
971   GetStruct()->convert_point_to_screen = view_convert_point_to_screen;
972   GetStruct()->convert_point_from_screen = view_convert_point_from_screen;
973   GetStruct()->convert_point_to_window = view_convert_point_to_window;
974   GetStruct()->convert_point_from_window = view_convert_point_from_window;
975   GetStruct()->convert_point_to_view = view_convert_point_to_view;
976   GetStruct()->convert_point_from_view = view_convert_point_from_view;
977 }
978 
979 // DESTRUCTOR - Do not edit by hand.
980 
~CefViewCppToC()981 CefViewCppToC::~CefViewCppToC() {
982   shutdown_checker::AssertNotShutdown();
983 }
984 
985 template <>
986 CefRefPtr<CefView>
UnwrapDerived(CefWrapperType type,cef_view_t * s)987 CefCppToCRefCounted<CefViewCppToC, CefView, cef_view_t>::UnwrapDerived(
988     CefWrapperType type,
989     cef_view_t* s) {
990   if (type == WT_BROWSER_VIEW) {
991     return CefBrowserViewCppToC::Unwrap(
992         reinterpret_cast<cef_browser_view_t*>(s));
993   }
994   if (type == WT_BUTTON) {
995     return CefButtonCppToC::Unwrap(reinterpret_cast<cef_button_t*>(s));
996   }
997   if (type == WT_LABEL_BUTTON) {
998     return CefLabelButtonCppToC::Unwrap(
999         reinterpret_cast<cef_label_button_t*>(s));
1000   }
1001   if (type == WT_MENU_BUTTON) {
1002     return CefMenuButtonCppToC::Unwrap(reinterpret_cast<cef_menu_button_t*>(s));
1003   }
1004   if (type == WT_PANEL) {
1005     return CefPanelCppToC::Unwrap(reinterpret_cast<cef_panel_t*>(s));
1006   }
1007   if (type == WT_SCROLL_VIEW) {
1008     return CefScrollViewCppToC::Unwrap(reinterpret_cast<cef_scroll_view_t*>(s));
1009   }
1010   if (type == WT_TEXTFIELD) {
1011     return CefTextfieldCppToC::Unwrap(reinterpret_cast<cef_textfield_t*>(s));
1012   }
1013   if (type == WT_WINDOW) {
1014     return CefWindowCppToC::Unwrap(reinterpret_cast<cef_window_t*>(s));
1015   }
1016   NOTREACHED() << "Unexpected class type: " << type;
1017   return nullptr;
1018 }
1019 
1020 template <>
1021 CefWrapperType
1022     CefCppToCRefCounted<CefViewCppToC, CefView, cef_view_t>::kWrapperType =
1023         WT_VIEW;
1024