Stop using CefStructBase for POD types (fixes issue #3357)

This commit is contained in:
Marshall Greenblatt
2022-07-14 08:13:29 +00:00
parent 71ef10bb60
commit dad9bf87ef
26 changed files with 322 additions and 745 deletions

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=65c260e354b6dc85bf121b60081eff450b043542$
// $hash=3a9153112764b124ef7b38c7a29970c84a0b6b30$
//
#include "libcef_dll/cpptoc/browser_host_cpptoc.h"
@ -760,9 +760,8 @@ browser_host_send_external_begin_frame(struct _cef_browser_host_t* self) {
CefBrowserHostCppToC::Get(self)->SendExternalBeginFrame();
}
void CEF_CALLBACK
browser_host_send_key_event(struct _cef_browser_host_t* self,
const struct _cef_key_event_t* event) {
void CEF_CALLBACK browser_host_send_key_event(struct _cef_browser_host_t* self,
const cef_key_event_t* event) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -770,27 +769,21 @@ browser_host_send_key_event(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefKeyEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefKeyEvent eventVal = event ? *event : CefKeyEvent();
// Execute
CefBrowserHostCppToC::Get(self)->SendKeyEvent(eventObj);
CefBrowserHostCppToC::Get(self)->SendKeyEvent(eventVal);
}
void CEF_CALLBACK
browser_host_send_mouse_click_event(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
const cef_mouse_event_t* event,
cef_mouse_button_type_t type,
int mouseUp,
int clickCount) {
@ -801,28 +794,22 @@ browser_host_send_mouse_click_event(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefMouseEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefMouseEvent eventVal = event ? *event : CefMouseEvent();
// Execute
CefBrowserHostCppToC::Get(self)->SendMouseClickEvent(
eventObj, type, mouseUp ? true : false, clickCount);
eventVal, type, mouseUp ? true : false, clickCount);
}
void CEF_CALLBACK
browser_host_send_mouse_move_event(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
const cef_mouse_event_t* event,
int mouseLeave) {
shutdown_checker::AssertNotShutdown();
@ -831,28 +818,22 @@ browser_host_send_mouse_move_event(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefMouseEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefMouseEvent eventVal = event ? *event : CefMouseEvent();
// Execute
CefBrowserHostCppToC::Get(self)->SendMouseMoveEvent(
eventObj, mouseLeave ? true : false);
eventVal, mouseLeave ? true : false);
}
void CEF_CALLBACK
browser_host_send_mouse_wheel_event(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
const cef_mouse_event_t* event,
int deltaX,
int deltaY) {
shutdown_checker::AssertNotShutdown();
@ -862,28 +843,22 @@ browser_host_send_mouse_wheel_event(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefMouseEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefMouseEvent eventVal = event ? *event : CefMouseEvent();
// Execute
CefBrowserHostCppToC::Get(self)->SendMouseWheelEvent(eventObj, deltaX,
CefBrowserHostCppToC::Get(self)->SendMouseWheelEvent(eventVal, deltaX,
deltaY);
}
void CEF_CALLBACK
browser_host_send_touch_event(struct _cef_browser_host_t* self,
const struct _cef_touch_event_t* event) {
const cef_touch_event_t* event) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -891,22 +866,16 @@ browser_host_send_touch_event(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefTouchEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefTouchEvent eventVal = event ? *event : CefTouchEvent();
// Execute
CefBrowserHostCppToC::Get(self)->SendTouchEvent(eventObj);
CefBrowserHostCppToC::Get(self)->SendTouchEvent(eventVal);
}
void CEF_CALLBACK
@ -1073,7 +1042,7 @@ browser_host_ime_cancel_composition(struct _cef_browser_host_t* self) {
void CEF_CALLBACK
browser_host_drag_target_drag_enter(struct _cef_browser_host_t* self,
struct _cef_drag_data_t* drag_data,
const struct _cef_mouse_event_t* event,
const cef_mouse_event_t* event,
cef_drag_operations_mask_t allowed_ops) {
shutdown_checker::AssertNotShutdown();
@ -1086,28 +1055,22 @@ browser_host_drag_target_drag_enter(struct _cef_browser_host_t* self,
DCHECK(drag_data);
if (!drag_data)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefMouseEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefMouseEvent eventVal = event ? *event : CefMouseEvent();
// Execute
CefBrowserHostCppToC::Get(self)->DragTargetDragEnter(
CefDragDataCppToC::Unwrap(drag_data), eventObj, allowed_ops);
CefDragDataCppToC::Unwrap(drag_data), eventVal, allowed_ops);
}
void CEF_CALLBACK
browser_host_drag_target_drag_over(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event,
const cef_mouse_event_t* event,
cef_drag_operations_mask_t allowed_ops) {
shutdown_checker::AssertNotShutdown();
@ -1116,22 +1079,16 @@ browser_host_drag_target_drag_over(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefMouseEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefMouseEvent eventVal = event ? *event : CefMouseEvent();
// Execute
CefBrowserHostCppToC::Get(self)->DragTargetDragOver(eventObj, allowed_ops);
CefBrowserHostCppToC::Get(self)->DragTargetDragOver(eventVal, allowed_ops);
}
void CEF_CALLBACK
@ -1150,7 +1107,7 @@ browser_host_drag_target_drag_leave(struct _cef_browser_host_t* self) {
void CEF_CALLBACK
browser_host_drag_target_drop(struct _cef_browser_host_t* self,
const struct _cef_mouse_event_t* event) {
const cef_mouse_event_t* event) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -1158,22 +1115,16 @@ browser_host_drag_target_drop(struct _cef_browser_host_t* self,
DCHECK(self);
if (!self)
return;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return;
}
// Translate param: event; type: struct_byref_const
CefMouseEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefMouseEvent eventVal = event ? *event : CefMouseEvent();
// Execute
CefBrowserHostCppToC::Get(self)->DragTargetDrop(eventObj);
CefBrowserHostCppToC::Get(self)->DragTargetDrop(eventVal);
}
void CEF_CALLBACK

View File

@ -9,14 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b492dccf2a5ddb50f50fe1783d8cacd3080714a5$
// $hash=53bd2b4cabde53903719d240c7c9f6000cbf1a37$
//
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/frame_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
#include "libcef_dll/transfer_util.h"
namespace {
@ -253,12 +252,12 @@ display_handler_on_loading_progress_change(struct _cef_display_handler_t* self,
CefBrowserCToCpp::Wrap(browser), progress);
}
int CEF_CALLBACK display_handler_on_cursor_change(
struct _cef_display_handler_t* self,
cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info) {
int CEF_CALLBACK
display_handler_on_cursor_change(struct _cef_display_handler_t* self,
cef_browser_t* browser,
cef_cursor_handle_t cursor,
cef_cursor_type_t type,
const cef_cursor_info_t* custom_cursor_info) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -270,23 +269,18 @@ int CEF_CALLBACK display_handler_on_cursor_change(
DCHECK(browser);
if (!browser)
return 0;
// Verify param: custom_cursor_info; type: struct_byref_const
// Verify param: custom_cursor_info; type: simple_byref_const
DCHECK(custom_cursor_info);
if (!custom_cursor_info)
return 0;
if (!template_util::has_valid_size(custom_cursor_info)) {
NOTREACHED() << "invalid custom_cursor_info->[base.]size";
return 0;
}
// Translate param: custom_cursor_info; type: struct_byref_const
CefCursorInfo custom_cursor_infoObj;
if (custom_cursor_info)
custom_cursor_infoObj.Set(*custom_cursor_info, false);
// Translate param: custom_cursor_info; type: simple_byref_const
CefCursorInfo custom_cursor_infoVal =
custom_cursor_info ? *custom_cursor_info : CefCursorInfo();
// Execute
bool _retval = CefDisplayHandlerCppToC::Get(self)->OnCursorChange(
CefBrowserCToCpp::Wrap(browser), cursor, type, custom_cursor_infoObj);
CefBrowserCToCpp::Wrap(browser), cursor, type, custom_cursor_infoVal);
// Return type: bool
return _retval;

View File

@ -9,13 +9,12 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=8830306303ec402f4aaa21007719300c320ae77d$
// $hash=37d878ee8dbf3a48362059e64a0cafa8138bacfc$
//
#include "libcef_dll/cpptoc/keyboard_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
namespace {
@ -24,7 +23,7 @@ namespace {
int CEF_CALLBACK
keyboard_handler_on_pre_key_event(struct _cef_keyboard_handler_t* self,
cef_browser_t* browser,
const struct _cef_key_event_t* event,
const cef_key_event_t* event,
cef_event_handle_t os_event,
int* is_keyboard_shortcut) {
shutdown_checker::AssertNotShutdown();
@ -38,30 +37,24 @@ keyboard_handler_on_pre_key_event(struct _cef_keyboard_handler_t* self,
DCHECK(browser);
if (!browser)
return 0;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return 0;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return 0;
}
// Verify param: is_keyboard_shortcut; type: bool_byaddr
DCHECK(is_keyboard_shortcut);
if (!is_keyboard_shortcut)
return 0;
// Translate param: event; type: struct_byref_const
CefKeyEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefKeyEvent eventVal = event ? *event : CefKeyEvent();
// Translate param: is_keyboard_shortcut; type: bool_byaddr
bool is_keyboard_shortcutBool =
(is_keyboard_shortcut && *is_keyboard_shortcut) ? true : false;
// Execute
bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnPreKeyEvent(
CefBrowserCToCpp::Wrap(browser), eventObj, os_event,
CefBrowserCToCpp::Wrap(browser), eventVal, os_event,
&is_keyboard_shortcutBool);
// Restore param: is_keyboard_shortcut; type: bool_byaddr
@ -75,7 +68,7 @@ keyboard_handler_on_pre_key_event(struct _cef_keyboard_handler_t* self,
int CEF_CALLBACK
keyboard_handler_on_key_event(struct _cef_keyboard_handler_t* self,
cef_browser_t* browser,
const struct _cef_key_event_t* event,
const cef_key_event_t* event,
cef_event_handle_t os_event) {
shutdown_checker::AssertNotShutdown();
@ -88,23 +81,17 @@ keyboard_handler_on_key_event(struct _cef_keyboard_handler_t* self,
DCHECK(browser);
if (!browser)
return 0;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return 0;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return 0;
}
// Translate param: event; type: struct_byref_const
CefKeyEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefKeyEvent eventVal = event ? *event : CefKeyEvent();
// Execute
bool _retval = CefKeyboardHandlerCppToC::Get(self)->OnKeyEvent(
CefBrowserCToCpp::Wrap(browser), eventObj, os_event);
CefBrowserCToCpp::Wrap(browser), eventVal, os_event);
// Return type: bool
return _retval;

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=b7e2c44f09e8ec252b6481378d8fc8b23ba13f60$
// $hash=a98eb406c58de0e631b408cebd2b2cb0fcdfef7d$
//
#include "libcef_dll/cpptoc/life_span_handler_cpptoc.h"
@ -32,7 +32,7 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
const cef_string_t* target_frame_name,
cef_window_open_disposition_t target_disposition,
int user_gesture,
const struct _cef_popup_features_t* popupFeatures,
const cef_popup_features_t* popupFeatures,
cef_window_info_t* windowInfo,
cef_client_t** client,
struct _cef_browser_settings_t* settings,
@ -53,14 +53,10 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
DCHECK(frame);
if (!frame)
return 0;
// Verify param: popupFeatures; type: struct_byref_const
// Verify param: popupFeatures; type: simple_byref_const
DCHECK(popupFeatures);
if (!popupFeatures)
return 0;
if (!template_util::has_valid_size(popupFeatures)) {
NOTREACHED() << "invalid popupFeatures->[base.]size";
return 0;
}
// Verify param: windowInfo; type: struct_byref
DCHECK(windowInfo);
if (!windowInfo)
@ -91,10 +87,9 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
return 0;
// Unverified params: target_url, target_frame_name
// Translate param: popupFeatures; type: struct_byref_const
CefPopupFeatures popupFeaturesObj;
if (popupFeatures)
popupFeaturesObj.Set(*popupFeatures, false);
// Translate param: popupFeatures; type: simple_byref_const
CefPopupFeatures popupFeaturesVal =
popupFeatures ? *popupFeatures : CefPopupFeatures();
// Translate param: windowInfo; type: struct_byref
CefWindowInfo windowInfoObj;
if (windowInfo)
@ -121,7 +116,7 @@ int CEF_CALLBACK life_span_handler_on_before_popup(
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->OnBeforePopup(
CefBrowserCToCpp::Wrap(browser), CefFrameCToCpp::Wrap(frame),
CefString(target_url), CefString(target_frame_name), target_disposition,
user_gesture ? true : false, popupFeaturesObj, windowInfoObj, clientPtr,
user_gesture ? true : false, popupFeaturesVal, windowInfoObj, clientPtr,
settingsObj, extra_infoPtr, &no_javascript_accessBool);
// Restore param: windowInfo; type: struct_byref

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=6671ca3d639065c49adfc8ceac4c58833344d558$
// $hash=bae1669c71f95662417884910215fb4cba94c5a5$
//
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
@ -17,7 +17,6 @@
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
namespace {
@ -158,7 +157,7 @@ render_handler_get_screen_point(struct _cef_render_handler_t* self,
int CEF_CALLBACK
render_handler_get_screen_info(struct _cef_render_handler_t* self,
cef_browser_t* browser,
struct _cef_screen_info_t* screen_info) {
cef_screen_info_t* screen_info) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -170,27 +169,21 @@ render_handler_get_screen_info(struct _cef_render_handler_t* self,
DCHECK(browser);
if (!browser)
return 0;
// Verify param: screen_info; type: struct_byref
// Verify param: screen_info; type: simple_byref
DCHECK(screen_info);
if (!screen_info)
return 0;
if (!template_util::has_valid_size(screen_info)) {
NOTREACHED() << "invalid screen_info->[base.]size";
return 0;
}
// Translate param: screen_info; type: struct_byref
CefScreenInfo screen_infoObj;
if (screen_info)
screen_infoObj.AttachTo(*screen_info);
// Translate param: screen_info; type: simple_byref
CefScreenInfo screen_infoVal = screen_info ? *screen_info : CefScreenInfo();
// Execute
bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenInfo(
CefBrowserCToCpp::Wrap(browser), screen_infoObj);
CefBrowserCToCpp::Wrap(browser), screen_infoVal);
// Restore param: screen_info; type: struct_byref
// Restore param: screen_info; type: simple_byref
if (screen_info)
screen_infoObj.DetachTo(*screen_info);
*screen_info = screen_infoVal;
// Return type: bool
return _retval;
@ -365,7 +358,7 @@ render_handler_get_touch_handle_size(struct _cef_render_handler_t* self,
void CEF_CALLBACK render_handler_on_touch_handle_state_changed(
struct _cef_render_handler_t* self,
cef_browser_t* browser,
const struct _cef_touch_handle_state_t* state) {
const cef_touch_handle_state_t* state) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -377,23 +370,17 @@ void CEF_CALLBACK render_handler_on_touch_handle_state_changed(
DCHECK(browser);
if (!browser)
return;
// Verify param: state; type: struct_byref_const
// Verify param: state; type: simple_byref_const
DCHECK(state);
if (!state)
return;
if (!template_util::has_valid_size(state)) {
NOTREACHED() << "invalid state->[base.]size";
return;
}
// Translate param: state; type: struct_byref_const
CefTouchHandleState stateObj;
if (state)
stateObj.Set(*state, false);
// Translate param: state; type: simple_byref_const
CefTouchHandleState stateVal = state ? *state : CefTouchHandleState();
// Execute
CefRenderHandlerCppToC::Get(self)->OnTouchHandleStateChanged(
CefBrowserCToCpp::Wrap(browser), stateObj);
CefBrowserCToCpp::Wrap(browser), stateVal);
}
int CEF_CALLBACK

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=4d101afc4f559c6f0375ad4016e5575ab88bf61f$
// $hash=8b6386137895a8c202890fd6a5d239eddd9e400e$
//
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
@ -25,7 +25,6 @@
#include "libcef_dll/ctocpp/views/panel_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
@ -84,7 +83,7 @@ panel_set_to_fill_layout(struct _cef_panel_t* self) {
cef_box_layout_t* CEF_CALLBACK
panel_set_to_box_layout(struct _cef_panel_t* self,
const struct _cef_box_layout_settings_t* settings) {
const cef_box_layout_settings_t* settings) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -92,23 +91,18 @@ panel_set_to_box_layout(struct _cef_panel_t* self,
DCHECK(self);
if (!self)
return NULL;
// Verify param: settings; type: struct_byref_const
// Verify param: settings; type: simple_byref_const
DCHECK(settings);
if (!settings)
return NULL;
if (!template_util::has_valid_size(settings)) {
NOTREACHED() << "invalid settings->[base.]size";
return NULL;
}
// Translate param: settings; type: struct_byref_const
CefBoxLayoutSettings settingsObj;
if (settings)
settingsObj.Set(*settings, false);
// Translate param: settings; type: simple_byref_const
CefBoxLayoutSettings settingsVal =
settings ? *settings : CefBoxLayoutSettings();
// Execute
CefRefPtr<CefBoxLayout> _retval =
CefPanelCppToC::Get(self)->SetToBoxLayout(settingsObj);
CefPanelCppToC::Get(self)->SetToBoxLayout(settingsVal);
// Return type: refptr_same
return CefBoxLayoutCppToC::Wrap(_retval);

View File

@ -9,14 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1a7a3f0cd61dab86aae86ca54e5554671d1850b7$
// $hash=be4a8b1aeaa7b2c6701c9cc5445285a20027c44b$
//
#include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/views/textfield_ctocpp.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
namespace {
@ -25,7 +24,7 @@ namespace {
int CEF_CALLBACK
textfield_delegate_on_key_event(struct _cef_textfield_delegate_t* self,
cef_textfield_t* textfield,
const struct _cef_key_event_t* event) {
const cef_key_event_t* event) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -37,23 +36,17 @@ textfield_delegate_on_key_event(struct _cef_textfield_delegate_t* self,
DCHECK(textfield);
if (!textfield)
return 0;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return 0;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return 0;
}
// Translate param: event; type: struct_byref_const
CefKeyEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefKeyEvent eventVal = event ? *event : CefKeyEvent();
// Execute
bool _retval = CefTextfieldDelegateCppToC::Get(self)->OnKeyEvent(
CefTextfieldCToCpp::Wrap(textfield), eventObj);
CefTextfieldCToCpp::Wrap(textfield), eventVal);
// Return type: bool
return _retval;

View File

@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=cf3e61b4caedb8689bcc3a0a5b21b1897eef5220$
// $hash=32506537b2118f2d16285dc09174ae721447adc2$
//
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
@ -29,7 +29,6 @@
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_delegate_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
// GLOBAL FUNCTIONS - Body may be edited by hand.
@ -691,7 +690,7 @@ window_set_to_fill_layout(struct _cef_panel_t* self) {
cef_box_layout_t* CEF_CALLBACK
window_set_to_box_layout(struct _cef_panel_t* self,
const struct _cef_box_layout_settings_t* settings) {
const cef_box_layout_settings_t* settings) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -699,24 +698,19 @@ window_set_to_box_layout(struct _cef_panel_t* self,
DCHECK(self);
if (!self)
return NULL;
// Verify param: settings; type: struct_byref_const
// Verify param: settings; type: simple_byref_const
DCHECK(settings);
if (!settings)
return NULL;
if (!template_util::has_valid_size(settings)) {
NOTREACHED() << "invalid settings->[base.]size";
return NULL;
}
// Translate param: settings; type: struct_byref_const
CefBoxLayoutSettings settingsObj;
if (settings)
settingsObj.Set(*settings, false);
// Translate param: settings; type: simple_byref_const
CefBoxLayoutSettings settingsVal =
settings ? *settings : CefBoxLayoutSettings();
// Execute
CefRefPtr<CefBoxLayout> _retval =
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))
->SetToBoxLayout(settingsObj);
->SetToBoxLayout(settingsVal);
// Return type: refptr_same
return CefBoxLayoutCppToC::Wrap(_retval);

View File

@ -9,14 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=60fce570867addbf622a0f74422d225f23942e4d$
// $hash=2ecdf3e890e54e962286430f350c5b49249a9a9e$
//
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
#include "libcef_dll/ctocpp/views/window_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
#include "libcef_dll/template_util.h"
namespace {
@ -317,7 +316,7 @@ window_delegate_on_accelerator(struct _cef_window_delegate_t* self,
int CEF_CALLBACK
window_delegate_on_key_event(struct _cef_window_delegate_t* self,
cef_window_t* window,
const struct _cef_key_event_t* event) {
const cef_key_event_t* event) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -329,23 +328,17 @@ window_delegate_on_key_event(struct _cef_window_delegate_t* self,
DCHECK(window);
if (!window)
return 0;
// Verify param: event; type: struct_byref_const
// Verify param: event; type: simple_byref_const
DCHECK(event);
if (!event)
return 0;
if (!template_util::has_valid_size(event)) {
NOTREACHED() << "invalid event->[base.]size";
return 0;
}
// Translate param: event; type: struct_byref_const
CefKeyEvent eventObj;
if (event)
eventObj.Set(*event, false);
// Translate param: event; type: simple_byref_const
CefKeyEvent eventVal = event ? *event : CefKeyEvent();
// Execute
bool _retval = CefWindowDelegateCppToC::Get(self)->OnKeyEvent(
CefWindowCToCpp::Wrap(window), eventObj);
CefWindowCToCpp::Wrap(window), eventVal);
// Return type: bool
return _retval;