• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=a0060b09d6eb4bbeeb69e4b80dccccee394d600e$
13 //
14 
15 #include "libcef_dll/cpptoc/views/button_cpptoc.h"
16 #include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
17 #include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
18 #include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
19 #include "libcef_dll/cpptoc/views/panel_cpptoc.h"
20 #include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
21 #include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
22 #include "libcef_dll/cpptoc/views/view_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_label_button_t* CEF_CALLBACK
button_as_label_button(struct _cef_button_t * self)32 button_as_label_button(struct _cef_button_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<CefLabelButton> _retval =
43       CefButtonCppToC::Get(self)->AsLabelButton();
44 
45   // Return type: refptr_same
46   return CefLabelButtonCppToC::Wrap(_retval);
47 }
48 
button_set_state(struct _cef_button_t * self,cef_button_state_t state)49 void CEF_CALLBACK button_set_state(struct _cef_button_t* self,
50                                    cef_button_state_t state) {
51   shutdown_checker::AssertNotShutdown();
52 
53   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
54 
55   DCHECK(self);
56   if (!self)
57     return;
58 
59   // Execute
60   CefButtonCppToC::Get(self)->SetState(state);
61 }
62 
button_get_state(struct _cef_button_t * self)63 cef_button_state_t CEF_CALLBACK button_get_state(struct _cef_button_t* self) {
64   shutdown_checker::AssertNotShutdown();
65 
66   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
67 
68   DCHECK(self);
69   if (!self)
70     return CEF_BUTTON_STATE_NORMAL;
71 
72   // Execute
73   cef_button_state_t _retval = CefButtonCppToC::Get(self)->GetState();
74 
75   // Return type: simple
76   return _retval;
77 }
78 
button_set_ink_drop_enabled(struct _cef_button_t * self,int enabled)79 void CEF_CALLBACK button_set_ink_drop_enabled(struct _cef_button_t* self,
80                                               int enabled) {
81   shutdown_checker::AssertNotShutdown();
82 
83   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
84 
85   DCHECK(self);
86   if (!self)
87     return;
88 
89   // Execute
90   CefButtonCppToC::Get(self)->SetInkDropEnabled(enabled ? true : false);
91 }
92 
button_set_tooltip_text(struct _cef_button_t * self,const cef_string_t * tooltip_text)93 void CEF_CALLBACK button_set_tooltip_text(struct _cef_button_t* self,
94                                           const cef_string_t* tooltip_text) {
95   shutdown_checker::AssertNotShutdown();
96 
97   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
98 
99   DCHECK(self);
100   if (!self)
101     return;
102   // Verify param: tooltip_text; type: string_byref_const
103   DCHECK(tooltip_text);
104   if (!tooltip_text)
105     return;
106 
107   // Execute
108   CefButtonCppToC::Get(self)->SetTooltipText(CefString(tooltip_text));
109 }
110 
button_set_accessible_name(struct _cef_button_t * self,const cef_string_t * name)111 void CEF_CALLBACK button_set_accessible_name(struct _cef_button_t* self,
112                                              const cef_string_t* name) {
113   shutdown_checker::AssertNotShutdown();
114 
115   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
116 
117   DCHECK(self);
118   if (!self)
119     return;
120   // Verify param: name; type: string_byref_const
121   DCHECK(name);
122   if (!name)
123     return;
124 
125   // Execute
126   CefButtonCppToC::Get(self)->SetAccessibleName(CefString(name));
127 }
128 
129 cef_browser_view_t* CEF_CALLBACK
button_as_browser_view(struct _cef_view_t * self)130 button_as_browser_view(struct _cef_view_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 NULL;
138 
139   // Execute
140   CefRefPtr<CefBrowserView> _retval =
141       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
142           ->AsBrowserView();
143 
144   // Return type: refptr_same
145   return CefBrowserViewCppToC::Wrap(_retval);
146 }
147 
button_as_button(struct _cef_view_t * self)148 cef_button_t* CEF_CALLBACK button_as_button(struct _cef_view_t* self) {
149   shutdown_checker::AssertNotShutdown();
150 
151   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
152 
153   DCHECK(self);
154   if (!self)
155     return NULL;
156 
157   // Execute
158   CefRefPtr<CefButton> _retval =
159       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->AsButton();
160 
161   // Return type: refptr_same
162   return CefButtonCppToC::Wrap(_retval);
163 }
164 
button_as_panel(struct _cef_view_t * self)165 cef_panel_t* CEF_CALLBACK button_as_panel(struct _cef_view_t* self) {
166   shutdown_checker::AssertNotShutdown();
167 
168   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
169 
170   DCHECK(self);
171   if (!self)
172     return NULL;
173 
174   // Execute
175   CefRefPtr<CefPanel> _retval =
176       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->AsPanel();
177 
178   // Return type: refptr_same
179   return CefPanelCppToC::Wrap(_retval);
180 }
181 
182 cef_scroll_view_t* CEF_CALLBACK
button_as_scroll_view(struct _cef_view_t * self)183 button_as_scroll_view(struct _cef_view_t* self) {
184   shutdown_checker::AssertNotShutdown();
185 
186   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
187 
188   DCHECK(self);
189   if (!self)
190     return NULL;
191 
192   // Execute
193   CefRefPtr<CefScrollView> _retval =
194       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
195           ->AsScrollView();
196 
197   // Return type: refptr_same
198   return CefScrollViewCppToC::Wrap(_retval);
199 }
200 
button_as_textfield(struct _cef_view_t * self)201 cef_textfield_t* CEF_CALLBACK button_as_textfield(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<CefTextfield> _retval =
212       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
213           ->AsTextfield();
214 
215   // Return type: refptr_same
216   return CefTextfieldCppToC::Wrap(_retval);
217 }
218 
219 cef_string_userfree_t CEF_CALLBACK
button_get_type_string(struct _cef_view_t * self)220 button_get_type_string(struct _cef_view_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 NULL;
228 
229   // Execute
230   CefString _retval =
231       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
232           ->GetTypeString();
233 
234   // Return type: string
235   return _retval.DetachToUserFree();
236 }
237 
button_to_string(struct _cef_view_t * self,int include_children)238 cef_string_userfree_t CEF_CALLBACK button_to_string(struct _cef_view_t* self,
239                                                     int include_children) {
240   shutdown_checker::AssertNotShutdown();
241 
242   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
243 
244   DCHECK(self);
245   if (!self)
246     return NULL;
247 
248   // Execute
249   CefString _retval =
250       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
251           ->ToString(include_children ? true : false);
252 
253   // Return type: string
254   return _retval.DetachToUserFree();
255 }
256 
button_is_valid(struct _cef_view_t * self)257 int CEF_CALLBACK button_is_valid(struct _cef_view_t* self) {
258   shutdown_checker::AssertNotShutdown();
259 
260   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
261 
262   DCHECK(self);
263   if (!self)
264     return 0;
265 
266   // Execute
267   bool _retval =
268       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->IsValid();
269 
270   // Return type: bool
271   return _retval;
272 }
273 
button_is_attached(struct _cef_view_t * self)274 int CEF_CALLBACK button_is_attached(struct _cef_view_t* self) {
275   shutdown_checker::AssertNotShutdown();
276 
277   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
278 
279   DCHECK(self);
280   if (!self)
281     return 0;
282 
283   // Execute
284   bool _retval =
285       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->IsAttached();
286 
287   // Return type: bool
288   return _retval;
289 }
290 
button_is_same(struct _cef_view_t * self,struct _cef_view_t * that)291 int CEF_CALLBACK button_is_same(struct _cef_view_t* self,
292                                 struct _cef_view_t* that) {
293   shutdown_checker::AssertNotShutdown();
294 
295   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
296 
297   DCHECK(self);
298   if (!self)
299     return 0;
300   // Verify param: that; type: refptr_same
301   DCHECK(that);
302   if (!that)
303     return 0;
304 
305   // Execute
306   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
307                      ->IsSame(CefViewCppToC::Unwrap(that));
308 
309   // Return type: bool
310   return _retval;
311 }
312 
313 struct _cef_view_delegate_t* CEF_CALLBACK
button_get_delegate(struct _cef_view_t * self)314 button_get_delegate(struct _cef_view_t* self) {
315   shutdown_checker::AssertNotShutdown();
316 
317   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
318 
319   DCHECK(self);
320   if (!self)
321     return NULL;
322 
323   // Execute
324   CefRefPtr<CefViewDelegate> _retval =
325       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
326           ->GetDelegate();
327 
328   // Return type: refptr_diff
329   return CefViewDelegateCToCpp::Unwrap(_retval);
330 }
331 
button_get_window(struct _cef_view_t * self)332 struct _cef_window_t* CEF_CALLBACK button_get_window(struct _cef_view_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   CefRefPtr<CefWindow> _retval =
343       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->GetWindow();
344 
345   // Return type: refptr_same
346   return CefWindowCppToC::Wrap(_retval);
347 }
348 
button_get_id(struct _cef_view_t * self)349 int CEF_CALLBACK button_get_id(struct _cef_view_t* self) {
350   shutdown_checker::AssertNotShutdown();
351 
352   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
353 
354   DCHECK(self);
355   if (!self)
356     return 0;
357 
358   // Execute
359   int _retval =
360       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->GetID();
361 
362   // Return type: simple
363   return _retval;
364 }
365 
button_set_id(struct _cef_view_t * self,int id)366 void CEF_CALLBACK button_set_id(struct _cef_view_t* self, int id) {
367   shutdown_checker::AssertNotShutdown();
368 
369   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
370 
371   DCHECK(self);
372   if (!self)
373     return;
374 
375   // Execute
376   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetID(id);
377 }
378 
button_get_group_id(struct _cef_view_t * self)379 int CEF_CALLBACK button_get_group_id(struct _cef_view_t* self) {
380   shutdown_checker::AssertNotShutdown();
381 
382   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
383 
384   DCHECK(self);
385   if (!self)
386     return 0;
387 
388   // Execute
389   int _retval =
390       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->GetGroupID();
391 
392   // Return type: simple
393   return _retval;
394 }
395 
button_set_group_id(struct _cef_view_t * self,int group_id)396 void CEF_CALLBACK button_set_group_id(struct _cef_view_t* self, int group_id) {
397   shutdown_checker::AssertNotShutdown();
398 
399   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
400 
401   DCHECK(self);
402   if (!self)
403     return;
404 
405   // Execute
406   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
407       ->SetGroupID(group_id);
408 }
409 
410 struct _cef_view_t* CEF_CALLBACK
button_get_parent_view(struct _cef_view_t * self)411 button_get_parent_view(struct _cef_view_t* self) {
412   shutdown_checker::AssertNotShutdown();
413 
414   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
415 
416   DCHECK(self);
417   if (!self)
418     return NULL;
419 
420   // Execute
421   CefRefPtr<CefView> _retval =
422       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
423           ->GetParentView();
424 
425   // Return type: refptr_same
426   return CefViewCppToC::Wrap(_retval);
427 }
428 
429 struct _cef_view_t* CEF_CALLBACK
button_get_view_for_id(struct _cef_view_t * self,int id)430 button_get_view_for_id(struct _cef_view_t* self, int id) {
431   shutdown_checker::AssertNotShutdown();
432 
433   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
434 
435   DCHECK(self);
436   if (!self)
437     return NULL;
438 
439   // Execute
440   CefRefPtr<CefView> _retval =
441       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
442           ->GetViewForID(id);
443 
444   // Return type: refptr_same
445   return CefViewCppToC::Wrap(_retval);
446 }
447 
button_set_bounds(struct _cef_view_t * self,const cef_rect_t * bounds)448 void CEF_CALLBACK button_set_bounds(struct _cef_view_t* self,
449                                     const cef_rect_t* bounds) {
450   shutdown_checker::AssertNotShutdown();
451 
452   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
453 
454   DCHECK(self);
455   if (!self)
456     return;
457   // Verify param: bounds; type: simple_byref_const
458   DCHECK(bounds);
459   if (!bounds)
460     return;
461 
462   // Translate param: bounds; type: simple_byref_const
463   CefRect boundsVal = bounds ? *bounds : CefRect();
464 
465   // Execute
466   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
467       ->SetBounds(boundsVal);
468 }
469 
button_get_bounds(struct _cef_view_t * self)470 cef_rect_t CEF_CALLBACK button_get_bounds(struct _cef_view_t* self) {
471   shutdown_checker::AssertNotShutdown();
472 
473   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
474 
475   DCHECK(self);
476   if (!self)
477     return CefRect();
478 
479   // Execute
480   cef_rect_t _retval =
481       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->GetBounds();
482 
483   // Return type: simple
484   return _retval;
485 }
486 
button_get_bounds_in_screen(struct _cef_view_t * self)487 cef_rect_t CEF_CALLBACK button_get_bounds_in_screen(struct _cef_view_t* self) {
488   shutdown_checker::AssertNotShutdown();
489 
490   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
491 
492   DCHECK(self);
493   if (!self)
494     return CefRect();
495 
496   // Execute
497   cef_rect_t _retval =
498       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
499           ->GetBoundsInScreen();
500 
501   // Return type: simple
502   return _retval;
503 }
504 
button_set_size(struct _cef_view_t * self,const cef_size_t * size)505 void CEF_CALLBACK button_set_size(struct _cef_view_t* self,
506                                   const cef_size_t* size) {
507   shutdown_checker::AssertNotShutdown();
508 
509   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
510 
511   DCHECK(self);
512   if (!self)
513     return;
514   // Verify param: size; type: simple_byref_const
515   DCHECK(size);
516   if (!size)
517     return;
518 
519   // Translate param: size; type: simple_byref_const
520   CefSize sizeVal = size ? *size : CefSize();
521 
522   // Execute
523   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetSize(sizeVal);
524 }
525 
button_get_size(struct _cef_view_t * self)526 cef_size_t CEF_CALLBACK button_get_size(struct _cef_view_t* self) {
527   shutdown_checker::AssertNotShutdown();
528 
529   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
530 
531   DCHECK(self);
532   if (!self)
533     return CefSize();
534 
535   // Execute
536   cef_size_t _retval =
537       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->GetSize();
538 
539   // Return type: simple
540   return _retval;
541 }
542 
button_set_position(struct _cef_view_t * self,const cef_point_t * position)543 void CEF_CALLBACK button_set_position(struct _cef_view_t* self,
544                                       const cef_point_t* position) {
545   shutdown_checker::AssertNotShutdown();
546 
547   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
548 
549   DCHECK(self);
550   if (!self)
551     return;
552   // Verify param: position; type: simple_byref_const
553   DCHECK(position);
554   if (!position)
555     return;
556 
557   // Translate param: position; type: simple_byref_const
558   CefPoint positionVal = position ? *position : CefPoint();
559 
560   // Execute
561   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
562       ->SetPosition(positionVal);
563 }
564 
button_get_position(struct _cef_view_t * self)565 cef_point_t CEF_CALLBACK button_get_position(struct _cef_view_t* self) {
566   shutdown_checker::AssertNotShutdown();
567 
568   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
569 
570   DCHECK(self);
571   if (!self)
572     return CefPoint();
573 
574   // Execute
575   cef_point_t _retval =
576       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
577           ->GetPosition();
578 
579   // Return type: simple
580   return _retval;
581 }
582 
button_get_preferred_size(struct _cef_view_t * self)583 cef_size_t CEF_CALLBACK button_get_preferred_size(struct _cef_view_t* self) {
584   shutdown_checker::AssertNotShutdown();
585 
586   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
587 
588   DCHECK(self);
589   if (!self)
590     return CefSize();
591 
592   // Execute
593   cef_size_t _retval =
594       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
595           ->GetPreferredSize();
596 
597   // Return type: simple
598   return _retval;
599 }
600 
button_size_to_preferred_size(struct _cef_view_t * self)601 void CEF_CALLBACK button_size_to_preferred_size(struct _cef_view_t* self) {
602   shutdown_checker::AssertNotShutdown();
603 
604   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
605 
606   DCHECK(self);
607   if (!self)
608     return;
609 
610   // Execute
611   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
612       ->SizeToPreferredSize();
613 }
614 
button_get_minimum_size(struct _cef_view_t * self)615 cef_size_t CEF_CALLBACK button_get_minimum_size(struct _cef_view_t* self) {
616   shutdown_checker::AssertNotShutdown();
617 
618   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
619 
620   DCHECK(self);
621   if (!self)
622     return CefSize();
623 
624   // Execute
625   cef_size_t _retval =
626       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
627           ->GetMinimumSize();
628 
629   // Return type: simple
630   return _retval;
631 }
632 
button_get_maximum_size(struct _cef_view_t * self)633 cef_size_t CEF_CALLBACK button_get_maximum_size(struct _cef_view_t* self) {
634   shutdown_checker::AssertNotShutdown();
635 
636   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
637 
638   DCHECK(self);
639   if (!self)
640     return CefSize();
641 
642   // Execute
643   cef_size_t _retval =
644       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
645           ->GetMaximumSize();
646 
647   // Return type: simple
648   return _retval;
649 }
650 
button_get_height_for_width(struct _cef_view_t * self,int width)651 int CEF_CALLBACK button_get_height_for_width(struct _cef_view_t* self,
652                                              int width) {
653   shutdown_checker::AssertNotShutdown();
654 
655   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
656 
657   DCHECK(self);
658   if (!self)
659     return 0;
660 
661   // Execute
662   int _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
663                     ->GetHeightForWidth(width);
664 
665   // Return type: simple
666   return _retval;
667 }
668 
button_invalidate_layout(struct _cef_view_t * self)669 void CEF_CALLBACK button_invalidate_layout(struct _cef_view_t* self) {
670   shutdown_checker::AssertNotShutdown();
671 
672   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
673 
674   DCHECK(self);
675   if (!self)
676     return;
677 
678   // Execute
679   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
680       ->InvalidateLayout();
681 }
682 
button_set_visible(struct _cef_view_t * self,int visible)683 void CEF_CALLBACK button_set_visible(struct _cef_view_t* self, int visible) {
684   shutdown_checker::AssertNotShutdown();
685 
686   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
687 
688   DCHECK(self);
689   if (!self)
690     return;
691 
692   // Execute
693   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
694       ->SetVisible(visible ? true : false);
695 }
696 
button_is_visible(struct _cef_view_t * self)697 int CEF_CALLBACK button_is_visible(struct _cef_view_t* self) {
698   shutdown_checker::AssertNotShutdown();
699 
700   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
701 
702   DCHECK(self);
703   if (!self)
704     return 0;
705 
706   // Execute
707   bool _retval =
708       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->IsVisible();
709 
710   // Return type: bool
711   return _retval;
712 }
713 
button_is_drawn(struct _cef_view_t * self)714 int CEF_CALLBACK button_is_drawn(struct _cef_view_t* self) {
715   shutdown_checker::AssertNotShutdown();
716 
717   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
718 
719   DCHECK(self);
720   if (!self)
721     return 0;
722 
723   // Execute
724   bool _retval =
725       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->IsDrawn();
726 
727   // Return type: bool
728   return _retval;
729 }
730 
button_set_enabled(struct _cef_view_t * self,int enabled)731 void CEF_CALLBACK button_set_enabled(struct _cef_view_t* self, int enabled) {
732   shutdown_checker::AssertNotShutdown();
733 
734   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
735 
736   DCHECK(self);
737   if (!self)
738     return;
739 
740   // Execute
741   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
742       ->SetEnabled(enabled ? true : false);
743 }
744 
button_is_enabled(struct _cef_view_t * self)745 int CEF_CALLBACK button_is_enabled(struct _cef_view_t* self) {
746   shutdown_checker::AssertNotShutdown();
747 
748   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
749 
750   DCHECK(self);
751   if (!self)
752     return 0;
753 
754   // Execute
755   bool _retval =
756       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->IsEnabled();
757 
758   // Return type: bool
759   return _retval;
760 }
761 
button_set_focusable(struct _cef_view_t * self,int focusable)762 void CEF_CALLBACK button_set_focusable(struct _cef_view_t* self,
763                                        int focusable) {
764   shutdown_checker::AssertNotShutdown();
765 
766   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
767 
768   DCHECK(self);
769   if (!self)
770     return;
771 
772   // Execute
773   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
774       ->SetFocusable(focusable ? true : false);
775 }
776 
button_is_focusable(struct _cef_view_t * self)777 int CEF_CALLBACK button_is_focusable(struct _cef_view_t* self) {
778   shutdown_checker::AssertNotShutdown();
779 
780   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
781 
782   DCHECK(self);
783   if (!self)
784     return 0;
785 
786   // Execute
787   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
788                      ->IsFocusable();
789 
790   // Return type: bool
791   return _retval;
792 }
793 
button_is_accessibility_focusable(struct _cef_view_t * self)794 int CEF_CALLBACK button_is_accessibility_focusable(struct _cef_view_t* self) {
795   shutdown_checker::AssertNotShutdown();
796 
797   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
798 
799   DCHECK(self);
800   if (!self)
801     return 0;
802 
803   // Execute
804   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
805                      ->IsAccessibilityFocusable();
806 
807   // Return type: bool
808   return _retval;
809 }
810 
button_request_focus(struct _cef_view_t * self)811 void CEF_CALLBACK button_request_focus(struct _cef_view_t* self) {
812   shutdown_checker::AssertNotShutdown();
813 
814   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
815 
816   DCHECK(self);
817   if (!self)
818     return;
819 
820   // Execute
821   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->RequestFocus();
822 }
823 
button_set_background_color(struct _cef_view_t * self,cef_color_t color)824 void CEF_CALLBACK button_set_background_color(struct _cef_view_t* self,
825                                               cef_color_t color) {
826   shutdown_checker::AssertNotShutdown();
827 
828   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
829 
830   DCHECK(self);
831   if (!self)
832     return;
833 
834   // Execute
835   CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
836       ->SetBackgroundColor(color);
837 }
838 
button_get_background_color(struct _cef_view_t * self)839 cef_color_t CEF_CALLBACK button_get_background_color(struct _cef_view_t* self) {
840   shutdown_checker::AssertNotShutdown();
841 
842   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
843 
844   DCHECK(self);
845   if (!self)
846     return 0;
847 
848   // Execute
849   cef_color_t _retval =
850       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
851           ->GetBackgroundColor();
852 
853   // Return type: simple
854   return _retval;
855 }
856 
button_convert_point_to_screen(struct _cef_view_t * self,cef_point_t * point)857 int CEF_CALLBACK button_convert_point_to_screen(struct _cef_view_t* self,
858                                                 cef_point_t* point) {
859   shutdown_checker::AssertNotShutdown();
860 
861   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
862 
863   DCHECK(self);
864   if (!self)
865     return 0;
866   // Verify param: point; type: simple_byref
867   DCHECK(point);
868   if (!point)
869     return 0;
870 
871   // Translate param: point; type: simple_byref
872   CefPoint pointVal = point ? *point : CefPoint();
873 
874   // Execute
875   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
876                      ->ConvertPointToScreen(pointVal);
877 
878   // Restore param: point; type: simple_byref
879   if (point)
880     *point = pointVal;
881 
882   // Return type: bool
883   return _retval;
884 }
885 
button_convert_point_from_screen(struct _cef_view_t * self,cef_point_t * point)886 int CEF_CALLBACK button_convert_point_from_screen(struct _cef_view_t* self,
887                                                   cef_point_t* point) {
888   shutdown_checker::AssertNotShutdown();
889 
890   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
891 
892   DCHECK(self);
893   if (!self)
894     return 0;
895   // Verify param: point; type: simple_byref
896   DCHECK(point);
897   if (!point)
898     return 0;
899 
900   // Translate param: point; type: simple_byref
901   CefPoint pointVal = point ? *point : CefPoint();
902 
903   // Execute
904   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
905                      ->ConvertPointFromScreen(pointVal);
906 
907   // Restore param: point; type: simple_byref
908   if (point)
909     *point = pointVal;
910 
911   // Return type: bool
912   return _retval;
913 }
914 
button_convert_point_to_window(struct _cef_view_t * self,cef_point_t * point)915 int CEF_CALLBACK button_convert_point_to_window(struct _cef_view_t* self,
916                                                 cef_point_t* point) {
917   shutdown_checker::AssertNotShutdown();
918 
919   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
920 
921   DCHECK(self);
922   if (!self)
923     return 0;
924   // Verify param: point; type: simple_byref
925   DCHECK(point);
926   if (!point)
927     return 0;
928 
929   // Translate param: point; type: simple_byref
930   CefPoint pointVal = point ? *point : CefPoint();
931 
932   // Execute
933   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
934                      ->ConvertPointToWindow(pointVal);
935 
936   // Restore param: point; type: simple_byref
937   if (point)
938     *point = pointVal;
939 
940   // Return type: bool
941   return _retval;
942 }
943 
button_convert_point_from_window(struct _cef_view_t * self,cef_point_t * point)944 int CEF_CALLBACK button_convert_point_from_window(struct _cef_view_t* self,
945                                                   cef_point_t* point) {
946   shutdown_checker::AssertNotShutdown();
947 
948   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
949 
950   DCHECK(self);
951   if (!self)
952     return 0;
953   // Verify param: point; type: simple_byref
954   DCHECK(point);
955   if (!point)
956     return 0;
957 
958   // Translate param: point; type: simple_byref
959   CefPoint pointVal = point ? *point : CefPoint();
960 
961   // Execute
962   bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
963                      ->ConvertPointFromWindow(pointVal);
964 
965   // Restore param: point; type: simple_byref
966   if (point)
967     *point = pointVal;
968 
969   // Return type: bool
970   return _retval;
971 }
972 
button_convert_point_to_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)973 int CEF_CALLBACK button_convert_point_to_view(struct _cef_view_t* self,
974                                               struct _cef_view_t* view,
975                                               cef_point_t* point) {
976   shutdown_checker::AssertNotShutdown();
977 
978   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
979 
980   DCHECK(self);
981   if (!self)
982     return 0;
983   // Verify param: view; type: refptr_same
984   DCHECK(view);
985   if (!view)
986     return 0;
987   // Verify param: point; type: simple_byref
988   DCHECK(point);
989   if (!point)
990     return 0;
991 
992   // Translate param: point; type: simple_byref
993   CefPoint pointVal = point ? *point : CefPoint();
994 
995   // Execute
996   bool _retval =
997       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
998           ->ConvertPointToView(CefViewCppToC::Unwrap(view), pointVal);
999 
1000   // Restore param: point; type: simple_byref
1001   if (point)
1002     *point = pointVal;
1003 
1004   // Return type: bool
1005   return _retval;
1006 }
1007 
button_convert_point_from_view(struct _cef_view_t * self,struct _cef_view_t * view,cef_point_t * point)1008 int CEF_CALLBACK button_convert_point_from_view(struct _cef_view_t* self,
1009                                                 struct _cef_view_t* view,
1010                                                 cef_point_t* point) {
1011   shutdown_checker::AssertNotShutdown();
1012 
1013   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
1014 
1015   DCHECK(self);
1016   if (!self)
1017     return 0;
1018   // Verify param: view; type: refptr_same
1019   DCHECK(view);
1020   if (!view)
1021     return 0;
1022   // Verify param: point; type: simple_byref
1023   DCHECK(point);
1024   if (!point)
1025     return 0;
1026 
1027   // Translate param: point; type: simple_byref
1028   CefPoint pointVal = point ? *point : CefPoint();
1029 
1030   // Execute
1031   bool _retval =
1032       CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))
1033           ->ConvertPointFromView(CefViewCppToC::Unwrap(view), 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 
1043 }  // namespace
1044 
1045 // CONSTRUCTOR - Do not edit by hand.
1046 
CefButtonCppToC()1047 CefButtonCppToC::CefButtonCppToC() {
1048   GetStruct()->as_label_button = button_as_label_button;
1049   GetStruct()->set_state = button_set_state;
1050   GetStruct()->get_state = button_get_state;
1051   GetStruct()->set_ink_drop_enabled = button_set_ink_drop_enabled;
1052   GetStruct()->set_tooltip_text = button_set_tooltip_text;
1053   GetStruct()->set_accessible_name = button_set_accessible_name;
1054   GetStruct()->base.as_browser_view = button_as_browser_view;
1055   GetStruct()->base.as_button = button_as_button;
1056   GetStruct()->base.as_panel = button_as_panel;
1057   GetStruct()->base.as_scroll_view = button_as_scroll_view;
1058   GetStruct()->base.as_textfield = button_as_textfield;
1059   GetStruct()->base.get_type_string = button_get_type_string;
1060   GetStruct()->base.to_string = button_to_string;
1061   GetStruct()->base.is_valid = button_is_valid;
1062   GetStruct()->base.is_attached = button_is_attached;
1063   GetStruct()->base.is_same = button_is_same;
1064   GetStruct()->base.get_delegate = button_get_delegate;
1065   GetStruct()->base.get_window = button_get_window;
1066   GetStruct()->base.get_id = button_get_id;
1067   GetStruct()->base.set_id = button_set_id;
1068   GetStruct()->base.get_group_id = button_get_group_id;
1069   GetStruct()->base.set_group_id = button_set_group_id;
1070   GetStruct()->base.get_parent_view = button_get_parent_view;
1071   GetStruct()->base.get_view_for_id = button_get_view_for_id;
1072   GetStruct()->base.set_bounds = button_set_bounds;
1073   GetStruct()->base.get_bounds = button_get_bounds;
1074   GetStruct()->base.get_bounds_in_screen = button_get_bounds_in_screen;
1075   GetStruct()->base.set_size = button_set_size;
1076   GetStruct()->base.get_size = button_get_size;
1077   GetStruct()->base.set_position = button_set_position;
1078   GetStruct()->base.get_position = button_get_position;
1079   GetStruct()->base.get_preferred_size = button_get_preferred_size;
1080   GetStruct()->base.size_to_preferred_size = button_size_to_preferred_size;
1081   GetStruct()->base.get_minimum_size = button_get_minimum_size;
1082   GetStruct()->base.get_maximum_size = button_get_maximum_size;
1083   GetStruct()->base.get_height_for_width = button_get_height_for_width;
1084   GetStruct()->base.invalidate_layout = button_invalidate_layout;
1085   GetStruct()->base.set_visible = button_set_visible;
1086   GetStruct()->base.is_visible = button_is_visible;
1087   GetStruct()->base.is_drawn = button_is_drawn;
1088   GetStruct()->base.set_enabled = button_set_enabled;
1089   GetStruct()->base.is_enabled = button_is_enabled;
1090   GetStruct()->base.set_focusable = button_set_focusable;
1091   GetStruct()->base.is_focusable = button_is_focusable;
1092   GetStruct()->base.is_accessibility_focusable =
1093       button_is_accessibility_focusable;
1094   GetStruct()->base.request_focus = button_request_focus;
1095   GetStruct()->base.set_background_color = button_set_background_color;
1096   GetStruct()->base.get_background_color = button_get_background_color;
1097   GetStruct()->base.convert_point_to_screen = button_convert_point_to_screen;
1098   GetStruct()->base.convert_point_from_screen =
1099       button_convert_point_from_screen;
1100   GetStruct()->base.convert_point_to_window = button_convert_point_to_window;
1101   GetStruct()->base.convert_point_from_window =
1102       button_convert_point_from_window;
1103   GetStruct()->base.convert_point_to_view = button_convert_point_to_view;
1104   GetStruct()->base.convert_point_from_view = button_convert_point_from_view;
1105 }
1106 
1107 // DESTRUCTOR - Do not edit by hand.
1108 
~CefButtonCppToC()1109 CefButtonCppToC::~CefButtonCppToC() {
1110   shutdown_checker::AssertNotShutdown();
1111 }
1112 
1113 template <>
1114 CefRefPtr<CefButton>
UnwrapDerived(CefWrapperType type,cef_button_t * s)1115 CefCppToCRefCounted<CefButtonCppToC, CefButton, cef_button_t>::UnwrapDerived(
1116     CefWrapperType type,
1117     cef_button_t* s) {
1118   if (type == WT_LABEL_BUTTON) {
1119     return CefLabelButtonCppToC::Unwrap(
1120         reinterpret_cast<cef_label_button_t*>(s));
1121   }
1122   if (type == WT_MENU_BUTTON) {
1123     return CefMenuButtonCppToC::Unwrap(reinterpret_cast<cef_menu_button_t*>(s));
1124   }
1125   NOTREACHED() << "Unexpected class type: " << type;
1126   return nullptr;
1127 }
1128 
1129 template <>
1130 CefWrapperType CefCppToCRefCounted<CefButtonCppToC, CefButton, cef_button_t>::
1131     kWrapperType = WT_BUTTON;
1132