2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2015-09-09 16:05:39 +02: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=c042434f69811156a0ccfa21625d66790215003a$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/resource_bundle_cpptoc.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2020-07-21 17:55:54 +02:00
|
|
|
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CEF_EXPORT cef_resource_bundle_t* cef_resource_bundle_get_global() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefResourceBundle> _retval = CefResourceBundle::GetGlobal();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefResourceBundleCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
resource_bundle_get_localized_string(struct _cef_resource_bundle_t* self,
|
|
|
|
int string_id) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2015-09-09 16:05:39 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefString _retval =
|
|
|
|
CefResourceBundleCppToC::Get(self)->GetLocalizedString(string_id);
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
2020-07-21 17:55:54 +02:00
|
|
|
struct _cef_binary_value_t* CEF_CALLBACK
|
2017-05-17 11:29:28 +02:00
|
|
|
resource_bundle_get_data_resource(struct _cef_resource_bundle_t* self,
|
2020-07-21 17:55:54 +02:00
|
|
|
int resource_id) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-07-21 17:55:54 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
2020-07-21 17:55:54 +02:00
|
|
|
CefRefPtr<CefBinaryValue> _retval =
|
|
|
|
CefResourceBundleCppToC::Get(self)->GetDataResource(resource_id);
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCppToC::Wrap(_retval);
|
2015-09-09 16:05:39 +02:00
|
|
|
}
|
|
|
|
|
2020-07-21 17:55:54 +02:00
|
|
|
struct _cef_binary_value_t* CEF_CALLBACK
|
2017-05-17 11:29:28 +02:00
|
|
|
resource_bundle_get_data_resource_for_scale(struct _cef_resource_bundle_t* self,
|
|
|
|
int resource_id,
|
2020-07-21 17:55:54 +02:00
|
|
|
cef_scale_factor_t scale_factor) {
|
2015-09-09 16:05:39 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-07-21 17:55:54 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-09-09 16:05:39 +02:00
|
|
|
|
|
|
|
// Execute
|
2020-07-21 17:55:54 +02:00
|
|
|
CefRefPtr<CefBinaryValue> _retval =
|
|
|
|
CefResourceBundleCppToC::Get(self)->GetDataResourceForScale(resource_id,
|
|
|
|
scale_factor);
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCppToC::Wrap(_retval);
|
2015-09-09 16:05:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefResourceBundleCppToC::CefResourceBundleCppToC() {
|
|
|
|
GetStruct()->get_localized_string = resource_bundle_get_localized_string;
|
|
|
|
GetStruct()->get_data_resource = resource_bundle_get_data_resource;
|
|
|
|
GetStruct()->get_data_resource_for_scale =
|
|
|
|
resource_bundle_get_data_resource_for_scale;
|
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefResourceBundleCppToC::~CefResourceBundleCppToC() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefResourceBundle> CefCppToCRefCounted<
|
|
|
|
CefResourceBundleCppToC,
|
|
|
|
CefResourceBundle,
|
|
|
|
cef_resource_bundle_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_resource_bundle_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;
|
2015-09-09 16:05:39 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefResourceBundleCppToC,
|
|
|
|
CefResourceBundle,
|
|
|
|
cef_resource_bundle_t>::kWrapperType =
|
2017-02-09 23:07:43 +01:00
|
|
|
WT_RESOURCE_BUNDLE;
|