2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2016-01-19 21:09:01 +01:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2024-01-05 19:03:36 +01:00
|
|
|
// $hash=a69369fe8fadea409955f130afb3d158e9e66c79$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/menu_model_delegate_cpptoc.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
menu_model_delegate_execute_command(struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model,
|
|
|
|
int command_id,
|
|
|
|
cef_event_flags_t event_flags) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMenuModelDelegateCppToC::Get(self)->ExecuteCommand(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefMenuModelCToCpp::Wrap(menu_model), command_id, event_flags);
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
menu_model_delegate_mouse_outside_menu(struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model,
|
|
|
|
const cef_point_t* screen_point) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-02-22 19:05:27 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
// Verify param: screen_point; type: simple_byref_const
|
|
|
|
DCHECK(screen_point);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!screen_point) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Translate param: screen_point; type: simple_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPoint screen_pointVal = screen_point ? *screen_point : CefPoint();
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMenuModelDelegateCppToC::Get(self)->MouseOutsideMenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefMenuModelCToCpp::Wrap(menu_model), screen_pointVal);
|
2017-02-22 19:05:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK menu_model_delegate_unhandled_open_submenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model,
|
2017-02-22 19:05:27 +01:00
|
|
|
int is_rtl) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-02-22 19:05:27 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMenuModelDelegateCppToC::Get(self)->UnhandledOpenSubmenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefMenuModelCToCpp::Wrap(menu_model), is_rtl ? true : false);
|
2017-02-22 19:05:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK menu_model_delegate_unhandled_close_submenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model,
|
2017-02-22 19:05:27 +01:00
|
|
|
int is_rtl) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-02-22 19:05:27 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2017-02-22 19:05:27 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2017-02-22 19:05:27 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMenuModelDelegateCppToC::Get(self)->UnhandledCloseSubmenu(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefMenuModelCToCpp::Wrap(menu_model), is_rtl ? true : false);
|
2017-02-22 19:05:27 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
menu_model_delegate_menu_will_show(struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2016-01-19 21:09:01 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMenuModelDelegateCppToC::Get(self)->MenuWillShow(
|
|
|
|
CefMenuModelCToCpp::Wrap(menu_model));
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
menu_model_delegate_menu_closed(struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-28 19:17:32 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMenuModelDelegateCppToC::Get(self)->MenuClosed(
|
|
|
|
CefMenuModelCToCpp::Wrap(menu_model));
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
menu_model_delegate_format_label(struct _cef_menu_model_delegate_t* self,
|
|
|
|
cef_menu_model_t* menu_model,
|
|
|
|
cef_string_t* label) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-28 19:17:32 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
// Verify param: menu_model; type: refptr_diff
|
|
|
|
DCHECK(menu_model);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!menu_model) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
// Verify param: label; type: string_byref
|
|
|
|
DCHECK(label);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!label) {
|
2016-10-28 19:17:32 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// Translate param: label; type: string_byref
|
|
|
|
CefString labelStr(label);
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefMenuModelDelegateCppToC::Get(self)->FormatLabel(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefMenuModelCToCpp::Wrap(menu_model), labelStr);
|
2016-10-28 19:17:32 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2016-01-19 21:09:01 +01:00
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMenuModelDelegateCppToC::CefMenuModelDelegateCppToC() {
|
|
|
|
GetStruct()->execute_command = menu_model_delegate_execute_command;
|
2017-02-22 19:05:27 +01:00
|
|
|
GetStruct()->mouse_outside_menu = menu_model_delegate_mouse_outside_menu;
|
|
|
|
GetStruct()->unhandled_open_submenu =
|
|
|
|
menu_model_delegate_unhandled_open_submenu;
|
|
|
|
GetStruct()->unhandled_close_submenu =
|
|
|
|
menu_model_delegate_unhandled_close_submenu;
|
2016-01-19 21:09:01 +01:00
|
|
|
GetStruct()->menu_will_show = menu_model_delegate_menu_will_show;
|
2016-10-28 19:17:32 +02:00
|
|
|
GetStruct()->menu_closed = menu_model_delegate_menu_closed;
|
|
|
|
GetStruct()->format_label = menu_model_delegate_format_label;
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMenuModelDelegateCppToC::~CefMenuModelDelegateCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefMenuModelDelegate> CefCppToCRefCounted<
|
|
|
|
CefMenuModelDelegateCppToC,
|
|
|
|
CefMenuModelDelegate,
|
|
|
|
cef_menu_model_delegate_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_menu_model_delegate_t* s) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefMenuModelDelegateCppToC,
|
|
|
|
CefMenuModelDelegate,
|
|
|
|
cef_menu_model_delegate_t>::kWrapperType =
|
2016-01-19 21:09:01 +01:00
|
|
|
WT_MENU_MODEL_DELEGATE;
|