mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Implement Views framework on Windows and Linux (issue #1749).
- Add Views header files in a new include/views directory. - Add initial top-level window (CefWindow), control (CefBrowserView, CefLabelButton, CefMenuButton, CefPanel, CefScrollView, CefTextfield) and layout (CefBoxLayout, CefFlowLayout) support. See libcef/browser/views/view_impl.h comments for implementation details. - Add Views example usage in cefclient and cefsimple and Views unit tests in cef_unittests. Pass the `--use-views` command-line flag to cefclient, cefsimple and cef_unittests to run using the Views framework instead of platform APIs. For cefclient and cefsimple this will create the browser window and all related functionality using the Views framework. For cef_unittests this will run all tests (except OSR tests) in a Views-based browser window. Views- specific unit tests (`--gtest_filter=Views*`) will be run even if the the `--use-views` flag is not specified. - Pass the `--hide-frame` command-line flag to cefclient to demo a frameless Views-based browser window. - Pass the `--hide-controls` command-line flag to cefclient to demo a browser window without top controls. This also works in non-Views mode. - Pass the `--enable-high-dpi-support` command-line flag to cef_unittests on Windows to test high-DPI support on a display that supports it. - Add CefImage for reading/writing image file formats. - Add CefBrowser::DownloadImage() for downloading image URLs as a CefImage representation. This is primarily for loading favicons. - Add CefMenuModel::CreateMenuModel() and CefMenuModelDelegate for creating custom menus. This is primarily for use with CefMenuButton. - Add CefBrowser::TryCloseBrowser() helper for closing a browser. Also improve related documentation in cef_life_span_handler.h. - Rename cef_page_range_t to cef_range_t. It is now also used by CefTextfield. - Remove CefLifeSpanHandler::RunModal() which is never called. - Add draggable regions example to cefclient.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "libcef_dll/cpptoc/drag_data_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/client_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/download_image_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/navigation_entry_visitor_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/pdf_print_callback_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/run_file_dialog_callback_ctocpp.h"
|
||||
@@ -130,6 +131,21 @@ void CEF_CALLBACK browser_host_close_browser(struct _cef_browser_host_t* self,
|
||||
force_close?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_host_try_close_browser(
|
||||
struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserHostCppToC::Get(self)->TryCloseBrowser();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_set_focus(struct _cef_browser_host_t* self,
|
||||
int focus) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -188,6 +204,20 @@ cef_window_handle_t CEF_CALLBACK browser_host_get_opener_window_handle(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_host_has_view(struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserHostCppToC::Get(self)->HasView();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_client_t* CEF_CALLBACK browser_host_get_client(
|
||||
struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -297,6 +327,32 @@ void CEF_CALLBACK browser_host_start_download(struct _cef_browser_host_t* self,
|
||||
CefString(url));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_download_image(struct _cef_browser_host_t* self,
|
||||
const cef_string_t* image_url, int is_favicon, uint32 max_image_size,
|
||||
int bypass_cache, cef_download_image_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: image_url; type: string_byref_const
|
||||
DCHECK(image_url);
|
||||
if (!image_url)
|
||||
return;
|
||||
// Verify param: callback; type: refptr_diff
|
||||
DCHECK(callback);
|
||||
if (!callback)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserHostCppToC::Get(self)->DownloadImage(
|
||||
CefString(image_url),
|
||||
is_favicon?true:false,
|
||||
max_image_size,
|
||||
bypass_cache?true:false,
|
||||
CefDownloadImageCallbackCToCpp::Wrap(callback));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_host_print(struct _cef_browser_host_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
@@ -901,16 +957,19 @@ void CEF_CALLBACK browser_host_drag_source_system_drag_ended(
|
||||
CefBrowserHostCppToC::CefBrowserHostCppToC() {
|
||||
GetStruct()->get_browser = browser_host_get_browser;
|
||||
GetStruct()->close_browser = browser_host_close_browser;
|
||||
GetStruct()->try_close_browser = browser_host_try_close_browser;
|
||||
GetStruct()->set_focus = browser_host_set_focus;
|
||||
GetStruct()->set_window_visibility = browser_host_set_window_visibility;
|
||||
GetStruct()->get_window_handle = browser_host_get_window_handle;
|
||||
GetStruct()->get_opener_window_handle = browser_host_get_opener_window_handle;
|
||||
GetStruct()->has_view = browser_host_has_view;
|
||||
GetStruct()->get_client = browser_host_get_client;
|
||||
GetStruct()->get_request_context = browser_host_get_request_context;
|
||||
GetStruct()->get_zoom_level = browser_host_get_zoom_level;
|
||||
GetStruct()->set_zoom_level = browser_host_set_zoom_level;
|
||||
GetStruct()->run_file_dialog = browser_host_run_file_dialog;
|
||||
GetStruct()->start_download = browser_host_start_download;
|
||||
GetStruct()->download_image = browser_host_download_image;
|
||||
GetStruct()->print = browser_host_print;
|
||||
GetStruct()->print_to_pdf = browser_host_print_to_pdf;
|
||||
GetStruct()->find = browser_host_find;
|
||||
|
66
libcef_dll/cpptoc/download_image_callback_cpptoc.cc
Normal file
66
libcef_dll/cpptoc/download_image_callback_cpptoc.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/download_image_callback_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/image_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK download_image_callback_on_download_image_finished(
|
||||
struct _cef_download_image_callback_t* self, const cef_string_t* image_url,
|
||||
int http_status_code, struct _cef_image_t* image) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: image_url; type: string_byref_const
|
||||
DCHECK(image_url);
|
||||
if (!image_url)
|
||||
return;
|
||||
// Unverified params: image
|
||||
|
||||
// Execute
|
||||
CefDownloadImageCallbackCppToC::Get(self)->OnDownloadImageFinished(
|
||||
CefString(image_url),
|
||||
http_status_code,
|
||||
CefImageCToCpp::Wrap(image));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDownloadImageCallbackCppToC::CefDownloadImageCallbackCppToC() {
|
||||
GetStruct()->on_download_image_finished =
|
||||
download_image_callback_on_download_image_finished;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDownloadImageCallback> CefCppToC<CefDownloadImageCallbackCppToC,
|
||||
CefDownloadImageCallback, cef_download_image_callback_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_download_image_callback_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefDownloadImageCallbackCppToC,
|
||||
CefDownloadImageCallback, cef_download_image_callback_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDownloadImageCallbackCppToC,
|
||||
CefDownloadImageCallback, cef_download_image_callback_t>::kWrapperType =
|
||||
WT_DOWNLOAD_IMAGE_CALLBACK;
|
37
libcef_dll/cpptoc/download_image_callback_cpptoc.h
Normal file
37
libcef_dll/cpptoc/download_image_callback_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_IMAGE_CALLBACK_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_IMAGE_CALLBACK_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/capi/cef_client_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefDownloadImageCallbackCppToC
|
||||
: public CefCppToC<CefDownloadImageCallbackCppToC, CefDownloadImageCallback,
|
||||
cef_download_image_callback_t> {
|
||||
public:
|
||||
CefDownloadImageCallbackCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_DOWNLOAD_IMAGE_CALLBACK_CPPTOC_H_
|
403
libcef_dll/cpptoc/image_cpptoc.cc
Normal file
403
libcef_dll/cpptoc/image_cpptoc.cc
Normal file
@@ -0,0 +1,403 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/image_cpptoc.h"
|
||||
|
||||
|
||||
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
CEF_EXPORT cef_image_t* cef_image_create() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefImage> _retval = CefImage::CreateImage();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefImageCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK image_is_empty(struct _cef_image_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->IsEmpty();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_is_same(struct _cef_image_t* self,
|
||||
struct _cef_image_t* that) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that);
|
||||
if (!that)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->IsSame(
|
||||
CefImageCppToC::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_add_bitmap(struct _cef_image_t* self, float scale_factor,
|
||||
int pixel_width, int pixel_height, cef_color_type_t color_type,
|
||||
cef_alpha_type_t alpha_type, const void* pixel_data,
|
||||
size_t pixel_data_size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: pixel_data; type: simple_byaddr
|
||||
DCHECK(pixel_data);
|
||||
if (!pixel_data)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->AddBitmap(
|
||||
scale_factor,
|
||||
pixel_width,
|
||||
pixel_height,
|
||||
color_type,
|
||||
alpha_type,
|
||||
pixel_data,
|
||||
pixel_data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_add_png(struct _cef_image_t* self, float scale_factor,
|
||||
const void* png_data, size_t png_data_size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: png_data; type: simple_byaddr
|
||||
DCHECK(png_data);
|
||||
if (!png_data)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->AddPNG(
|
||||
scale_factor,
|
||||
png_data,
|
||||
png_data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_add_jpeg(struct _cef_image_t* self, float scale_factor,
|
||||
const void* jpeg_data, size_t jpeg_data_size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: jpeg_data; type: simple_byaddr
|
||||
DCHECK(jpeg_data);
|
||||
if (!jpeg_data)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->AddJPEG(
|
||||
scale_factor,
|
||||
jpeg_data,
|
||||
jpeg_data_size);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
size_t CEF_CALLBACK image_get_width(struct _cef_image_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = CefImageCppToC::Get(self)->GetWidth();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
size_t CEF_CALLBACK image_get_height(struct _cef_image_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
size_t _retval = CefImageCppToC::Get(self)->GetHeight();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_has_representation(struct _cef_image_t* self,
|
||||
float scale_factor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->HasRepresentation(
|
||||
scale_factor);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_remove_representation(struct _cef_image_t* self,
|
||||
float scale_factor) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->RemoveRepresentation(
|
||||
scale_factor);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK image_get_representation_info(struct _cef_image_t* self,
|
||||
float scale_factor, float* actual_scale_factor, int* pixel_width,
|
||||
int* pixel_height) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: actual_scale_factor; type: simple_byref
|
||||
DCHECK(actual_scale_factor);
|
||||
if (!actual_scale_factor)
|
||||
return 0;
|
||||
// Verify param: pixel_width; type: simple_byref
|
||||
DCHECK(pixel_width);
|
||||
if (!pixel_width)
|
||||
return 0;
|
||||
// Verify param: pixel_height; type: simple_byref
|
||||
DCHECK(pixel_height);
|
||||
if (!pixel_height)
|
||||
return 0;
|
||||
|
||||
// Translate param: actual_scale_factor; type: simple_byref
|
||||
float actual_scale_factorVal = actual_scale_factor?*actual_scale_factor:0;
|
||||
// Translate param: pixel_width; type: simple_byref
|
||||
int pixel_widthVal = pixel_width?*pixel_width:0;
|
||||
// Translate param: pixel_height; type: simple_byref
|
||||
int pixel_heightVal = pixel_height?*pixel_height:0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefImageCppToC::Get(self)->GetRepresentationInfo(
|
||||
scale_factor,
|
||||
actual_scale_factorVal,
|
||||
pixel_widthVal,
|
||||
pixel_heightVal);
|
||||
|
||||
// Restore param: actual_scale_factor; type: simple_byref
|
||||
if (actual_scale_factor)
|
||||
*actual_scale_factor = actual_scale_factorVal;
|
||||
// Restore param: pixel_width; type: simple_byref
|
||||
if (pixel_width)
|
||||
*pixel_width = pixel_widthVal;
|
||||
// Restore param: pixel_height; type: simple_byref
|
||||
if (pixel_height)
|
||||
*pixel_height = pixel_heightVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_binary_value_t* CEF_CALLBACK image_get_as_bitmap(
|
||||
struct _cef_image_t* self, float scale_factor, cef_color_type_t color_type,
|
||||
cef_alpha_type_t alpha_type, int* pixel_width, int* pixel_height) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: pixel_width; type: simple_byref
|
||||
DCHECK(pixel_width);
|
||||
if (!pixel_width)
|
||||
return NULL;
|
||||
// Verify param: pixel_height; type: simple_byref
|
||||
DCHECK(pixel_height);
|
||||
if (!pixel_height)
|
||||
return NULL;
|
||||
|
||||
// Translate param: pixel_width; type: simple_byref
|
||||
int pixel_widthVal = pixel_width?*pixel_width:0;
|
||||
// Translate param: pixel_height; type: simple_byref
|
||||
int pixel_heightVal = pixel_height?*pixel_height:0;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBinaryValue> _retval = CefImageCppToC::Get(self)->GetAsBitmap(
|
||||
scale_factor,
|
||||
color_type,
|
||||
alpha_type,
|
||||
pixel_widthVal,
|
||||
pixel_heightVal);
|
||||
|
||||
// Restore param: pixel_width; type: simple_byref
|
||||
if (pixel_width)
|
||||
*pixel_width = pixel_widthVal;
|
||||
// Restore param: pixel_height; type: simple_byref
|
||||
if (pixel_height)
|
||||
*pixel_height = pixel_heightVal;
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_binary_value_t* CEF_CALLBACK image_get_as_png(
|
||||
struct _cef_image_t* self, float scale_factor, int with_transparency,
|
||||
int* pixel_width, int* pixel_height) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: pixel_width; type: simple_byref
|
||||
DCHECK(pixel_width);
|
||||
if (!pixel_width)
|
||||
return NULL;
|
||||
// Verify param: pixel_height; type: simple_byref
|
||||
DCHECK(pixel_height);
|
||||
if (!pixel_height)
|
||||
return NULL;
|
||||
|
||||
// Translate param: pixel_width; type: simple_byref
|
||||
int pixel_widthVal = pixel_width?*pixel_width:0;
|
||||
// Translate param: pixel_height; type: simple_byref
|
||||
int pixel_heightVal = pixel_height?*pixel_height:0;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBinaryValue> _retval = CefImageCppToC::Get(self)->GetAsPNG(
|
||||
scale_factor,
|
||||
with_transparency?true:false,
|
||||
pixel_widthVal,
|
||||
pixel_heightVal);
|
||||
|
||||
// Restore param: pixel_width; type: simple_byref
|
||||
if (pixel_width)
|
||||
*pixel_width = pixel_widthVal;
|
||||
// Restore param: pixel_height; type: simple_byref
|
||||
if (pixel_height)
|
||||
*pixel_height = pixel_heightVal;
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_binary_value_t* CEF_CALLBACK image_get_as_jpeg(
|
||||
struct _cef_image_t* self, float scale_factor, int quality,
|
||||
int* pixel_width, int* pixel_height) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: pixel_width; type: simple_byref
|
||||
DCHECK(pixel_width);
|
||||
if (!pixel_width)
|
||||
return NULL;
|
||||
// Verify param: pixel_height; type: simple_byref
|
||||
DCHECK(pixel_height);
|
||||
if (!pixel_height)
|
||||
return NULL;
|
||||
|
||||
// Translate param: pixel_width; type: simple_byref
|
||||
int pixel_widthVal = pixel_width?*pixel_width:0;
|
||||
// Translate param: pixel_height; type: simple_byref
|
||||
int pixel_heightVal = pixel_height?*pixel_height:0;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBinaryValue> _retval = CefImageCppToC::Get(self)->GetAsJPEG(
|
||||
scale_factor,
|
||||
quality,
|
||||
pixel_widthVal,
|
||||
pixel_heightVal);
|
||||
|
||||
// Restore param: pixel_width; type: simple_byref
|
||||
if (pixel_width)
|
||||
*pixel_width = pixel_widthVal;
|
||||
// Restore param: pixel_height; type: simple_byref
|
||||
if (pixel_height)
|
||||
*pixel_height = pixel_heightVal;
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBinaryValueCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefImageCppToC::CefImageCppToC() {
|
||||
GetStruct()->is_empty = image_is_empty;
|
||||
GetStruct()->is_same = image_is_same;
|
||||
GetStruct()->add_bitmap = image_add_bitmap;
|
||||
GetStruct()->add_png = image_add_png;
|
||||
GetStruct()->add_jpeg = image_add_jpeg;
|
||||
GetStruct()->get_width = image_get_width;
|
||||
GetStruct()->get_height = image_get_height;
|
||||
GetStruct()->has_representation = image_has_representation;
|
||||
GetStruct()->remove_representation = image_remove_representation;
|
||||
GetStruct()->get_representation_info = image_get_representation_info;
|
||||
GetStruct()->get_as_bitmap = image_get_as_bitmap;
|
||||
GetStruct()->get_as_png = image_get_as_png;
|
||||
GetStruct()->get_as_jpeg = image_get_as_jpeg;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefImage> CefCppToC<CefImageCppToC, CefImage,
|
||||
cef_image_t>::UnwrapDerived(CefWrapperType type, cef_image_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefImageCppToC, CefImage,
|
||||
cef_image_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefImageCppToC, CefImage,
|
||||
cef_image_t>::kWrapperType = WT_IMAGE;
|
34
libcef_dll/cpptoc/image_cpptoc.h
Normal file
34
libcef_dll/cpptoc/image_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_IMAGE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_IMAGE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/cef_image.h"
|
||||
#include "include/capi/cef_image_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefImageCppToC
|
||||
: public CefCppToC<CefImageCppToC, CefImage, cef_image_t> {
|
||||
public:
|
||||
CefImageCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_IMAGE_CPPTOC_H_
|
@@ -139,26 +139,6 @@ void CEF_CALLBACK life_span_handler_on_after_created(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
int CEF_CALLBACK life_span_handler_run_modal(
|
||||
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefLifeSpanHandlerCppToC::Get(self)->RunModal(
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK life_span_handler_do_close(
|
||||
struct _cef_life_span_handler_t* self, cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -204,7 +184,6 @@ void CEF_CALLBACK life_span_handler_on_before_close(
|
||||
CefLifeSpanHandlerCppToC::CefLifeSpanHandlerCppToC() {
|
||||
GetStruct()->on_before_popup = life_span_handler_on_before_popup;
|
||||
GetStruct()->on_after_created = life_span_handler_on_after_created;
|
||||
GetStruct()->run_modal = life_span_handler_run_modal;
|
||||
GetStruct()->do_close = life_span_handler_do_close;
|
||||
GetStruct()->on_before_close = life_span_handler_on_before_close;
|
||||
}
|
||||
|
@@ -11,6 +11,27 @@
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/menu_model_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/menu_model_delegate_ctocpp.h"
|
||||
|
||||
|
||||
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
CEF_EXPORT cef_menu_model_t* cef_menu_model_create(
|
||||
struct _cef_menu_model_delegate_t* delegate) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: delegate; type: refptr_diff
|
||||
DCHECK(delegate);
|
||||
if (!delegate)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefMenuModel> _retval = CefMenuModel::CreateMenuModel(
|
||||
CefMenuModelDelegateCToCpp::Wrap(delegate));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefMenuModelCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
82
libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc
Normal file
82
libcef_dll/cpptoc/menu_model_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/menu_model_delegate_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/menu_model_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
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) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: menu_model; type: refptr_diff
|
||||
DCHECK(menu_model);
|
||||
if (!menu_model)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefMenuModelDelegateCppToC::Get(self)->ExecuteCommand(
|
||||
CefMenuModelCToCpp::Wrap(menu_model),
|
||||
command_id,
|
||||
event_flags);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK menu_model_delegate_menu_will_show(
|
||||
struct _cef_menu_model_delegate_t* self, cef_menu_model_t* menu_model) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: menu_model; type: refptr_diff
|
||||
DCHECK(menu_model);
|
||||
if (!menu_model)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefMenuModelDelegateCppToC::Get(self)->MenuWillShow(
|
||||
CefMenuModelCToCpp::Wrap(menu_model));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefMenuModelDelegateCppToC::CefMenuModelDelegateCppToC() {
|
||||
GetStruct()->execute_command = menu_model_delegate_execute_command;
|
||||
GetStruct()->menu_will_show = menu_model_delegate_menu_will_show;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefMenuModelDelegate> CefCppToC<CefMenuModelDelegateCppToC,
|
||||
CefMenuModelDelegate, cef_menu_model_delegate_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_menu_model_delegate_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefMenuModelDelegateCppToC,
|
||||
CefMenuModelDelegate, cef_menu_model_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefMenuModelDelegateCppToC,
|
||||
CefMenuModelDelegate, cef_menu_model_delegate_t>::kWrapperType =
|
||||
WT_MENU_MODEL_DELEGATE;
|
37
libcef_dll/cpptoc/menu_model_delegate_cpptoc.h
Normal file
37
libcef_dll/cpptoc/menu_model_delegate_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/cef_menu_model_delegate.h"
|
||||
#include "include/capi/cef_menu_model_delegate_capi.h"
|
||||
#include "include/cef_menu_model.h"
|
||||
#include "include/capi/cef_menu_model_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefMenuModelDelegateCppToC
|
||||
: public CefCppToC<CefMenuModelDelegateCppToC, CefMenuModelDelegate,
|
||||
cef_menu_model_delegate_t> {
|
||||
public:
|
||||
CefMenuModelDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_MENU_MODEL_DELEGATE_CPPTOC_H_
|
@@ -194,7 +194,7 @@ int CEF_CALLBACK print_settings_get_dpi(struct _cef_print_settings_t* self) {
|
||||
|
||||
void CEF_CALLBACK print_settings_set_page_ranges(
|
||||
struct _cef_print_settings_t* self, size_t rangesCount,
|
||||
cef_page_range_t const* ranges) {
|
||||
cef_range_t const* ranges) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@@ -206,10 +206,10 @@ void CEF_CALLBACK print_settings_set_page_ranges(
|
||||
return;
|
||||
|
||||
// Translate param: ranges; type: simple_vec_byref_const
|
||||
std::vector<CefPageRange > rangesList;
|
||||
std::vector<CefRange > rangesList;
|
||||
if (rangesCount > 0) {
|
||||
for (size_t i = 0; i < rangesCount; ++i) {
|
||||
CefPageRange rangesVal = ranges[i];
|
||||
CefRange rangesVal = ranges[i];
|
||||
rangesList.push_back(rangesVal);
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,7 @@ size_t CEF_CALLBACK print_settings_get_page_ranges_count(
|
||||
|
||||
void CEF_CALLBACK print_settings_get_page_ranges(
|
||||
struct _cef_print_settings_t* self, size_t* rangesCount,
|
||||
cef_page_range_t* ranges) {
|
||||
cef_range_t* ranges) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
@@ -248,7 +248,7 @@ void CEF_CALLBACK print_settings_get_page_ranges(
|
||||
return;
|
||||
|
||||
// Translate param: ranges; type: simple_vec_byref
|
||||
std::vector<CefPageRange > rangesList;
|
||||
std::vector<CefRange > rangesList;
|
||||
if (rangesCount && *rangesCount > 0 && ranges) {
|
||||
for (size_t i = 0; i < *rangesCount; ++i) {
|
||||
rangesList.push_back(ranges[i]);
|
||||
|
130
libcef_dll/cpptoc/views/box_layout_cpptoc.cc
Normal file
130
libcef_dll/cpptoc/views/box_layout_cpptoc.cc
Normal file
@@ -0,0 +1,130 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/box_layout_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK box_layout_set_flex_for_view(struct _cef_box_layout_t* self,
|
||||
struct _cef_view_t* view, int flex) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBoxLayoutCppToC::Get(self)->SetFlexForView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
flex);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK box_layout_clear_flex_for_view(struct _cef_box_layout_t* self,
|
||||
struct _cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBoxLayoutCppToC::Get(self)->ClearFlexForView(
|
||||
CefViewCppToC::Unwrap(view));
|
||||
}
|
||||
|
||||
cef_box_layout_t* CEF_CALLBACK box_layout_as_box_layout(
|
||||
struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBoxLayout> _retval = CefBoxLayoutCppToC::Get(
|
||||
reinterpret_cast<cef_box_layout_t*>(self))->AsBoxLayout();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBoxLayoutCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_fill_layout_t* CEF_CALLBACK box_layout_as_fill_layout(
|
||||
struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefFillLayout> _retval = CefBoxLayoutCppToC::Get(
|
||||
reinterpret_cast<cef_box_layout_t*>(self))->AsFillLayout();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFillLayoutCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK box_layout_is_valid(struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBoxLayoutCppToC::Get(reinterpret_cast<cef_box_layout_t*>(
|
||||
self))->IsValid();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBoxLayoutCppToC::CefBoxLayoutCppToC() {
|
||||
GetStruct()->set_flex_for_view = box_layout_set_flex_for_view;
|
||||
GetStruct()->clear_flex_for_view = box_layout_clear_flex_for_view;
|
||||
GetStruct()->base.as_box_layout = box_layout_as_box_layout;
|
||||
GetStruct()->base.as_fill_layout = box_layout_as_fill_layout;
|
||||
GetStruct()->base.is_valid = box_layout_is_valid;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBoxLayout> CefCppToC<CefBoxLayoutCppToC, CefBoxLayout,
|
||||
cef_box_layout_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_box_layout_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefBoxLayoutCppToC, CefBoxLayout,
|
||||
cef_box_layout_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBoxLayoutCppToC, CefBoxLayout,
|
||||
cef_box_layout_t>::kWrapperType = WT_BOX_LAYOUT;
|
36
libcef_dll/cpptoc/views/box_layout_cpptoc.h
Normal file
36
libcef_dll/cpptoc/views/box_layout_cpptoc.h
Normal file
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BOX_LAYOUT_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_BOX_LAYOUT_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_box_layout.h"
|
||||
#include "include/capi/views/cef_box_layout_capi.h"
|
||||
#include "include/views/cef_view.h"
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefBoxLayoutCppToC
|
||||
: public CefCppToC<CefBoxLayoutCppToC, CefBoxLayout, cef_box_layout_t> {
|
||||
public:
|
||||
CefBoxLayoutCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_BOX_LAYOUT_CPPTOC_H_
|
976
libcef_dll/cpptoc/views/browser_view_cpptoc.cc
Normal file
976
libcef_dll/cpptoc/views/browser_view_cpptoc.cc
Normal file
@@ -0,0 +1,976 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/browser_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/request_context_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/browser_view_delegate_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/client_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
|
||||
|
||||
|
||||
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
CEF_EXPORT cef_browser_view_t* cef_browser_view_create(cef_client_t* client,
|
||||
const cef_string_t* url, const struct _cef_browser_settings_t* settings,
|
||||
cef_request_context_t* request_context,
|
||||
cef_browser_view_delegate_t* delegate) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: settings; type: struct_byref_const
|
||||
DCHECK(settings);
|
||||
if (!settings)
|
||||
return NULL;
|
||||
// Unverified params: client, url, request_context, delegate
|
||||
|
||||
// Translate param: settings; type: struct_byref_const
|
||||
CefBrowserSettings settingsObj;
|
||||
if (settings)
|
||||
settingsObj.Set(*settings, false);
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowserView> _retval = CefBrowserView::CreateBrowserView(
|
||||
CefClientCToCpp::Wrap(client),
|
||||
CefString(url),
|
||||
settingsObj,
|
||||
CefRequestContextCppToC::Unwrap(request_context),
|
||||
CefBrowserViewDelegateCToCpp::Wrap(delegate));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
CEF_EXPORT cef_browser_view_t* cef_browser_view_get_for_browser(
|
||||
cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: browser; type: refptr_same
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowserView> _retval = CefBrowserView::GetForBrowser(
|
||||
CefBrowserCppToC::Unwrap(browser));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_browser_t* CEF_CALLBACK browser_view_get_browser(
|
||||
struct _cef_browser_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowser> _retval = CefBrowserViewCppToC::Get(self)->GetBrowser();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_browser_view_t* CEF_CALLBACK browser_view_as_browser_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowserView> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->AsBrowserView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_button_t* CEF_CALLBACK browser_view_as_button(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefButton> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->AsButton();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefButtonCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_panel_t* CEF_CALLBACK browser_view_as_panel(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefPanel> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->AsPanel();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPanelCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_scroll_view_t* CEF_CALLBACK browser_view_as_scroll_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefScrollView> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->AsScrollView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefScrollViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_textfield_t* CEF_CALLBACK browser_view_as_textfield(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefTextfield> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->AsTextfield();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefTextfieldCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK browser_view_get_type_string(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetTypeString();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK browser_view_to_string(
|
||||
struct _cef_view_t* self, int include_children) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ToString(
|
||||
include_children?true:false);
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_valid(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsValid();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_attached(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsAttached();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_same(struct _cef_view_t* self,
|
||||
struct _cef_view_t* that) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that);
|
||||
if (!that)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsSame(
|
||||
CefViewCppToC::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_view_delegate_t* CEF_CALLBACK browser_view_get_delegate(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefViewDelegate> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetDelegate();
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefViewDelegateCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_window_t* CEF_CALLBACK browser_view_get_window(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefWindow> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetWindow();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefWindowCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_get_id(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->GetID();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_id(struct _cef_view_t* self, int id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(self))->SetID(
|
||||
id);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK browser_view_get_parent_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefView> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetParentView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK browser_view_get_view_for_id(
|
||||
struct _cef_view_t* self, int id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefView> _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetViewForID(
|
||||
id);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_bounds(struct _cef_view_t* self,
|
||||
const cef_rect_t* bounds) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: bounds; type: simple_byref_const
|
||||
DCHECK(bounds);
|
||||
if (!bounds)
|
||||
return;
|
||||
|
||||
// Translate param: bounds; type: simple_byref_const
|
||||
CefRect boundsVal = bounds?*bounds:CefRect();
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetBounds(
|
||||
boundsVal);
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK browser_view_get_bounds(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetBounds();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK browser_view_get_bounds_in_screen(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetBoundsInScreen();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_size(struct _cef_view_t* self,
|
||||
const cef_size_t* size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: size; type: simple_byref_const
|
||||
DCHECK(size);
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
// Translate param: size; type: simple_byref_const
|
||||
CefSize sizeVal = size?*size:CefSize();
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetSize(
|
||||
sizeVal);
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_get_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_position(struct _cef_view_t* self,
|
||||
const cef_point_t* position) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: position; type: simple_byref_const
|
||||
DCHECK(position);
|
||||
if (!position)
|
||||
return;
|
||||
|
||||
// Translate param: position; type: simple_byref_const
|
||||
CefPoint positionVal = position?*position:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetPosition(
|
||||
positionVal);
|
||||
}
|
||||
|
||||
cef_point_t CEF_CALLBACK browser_view_get_position(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefPoint();
|
||||
|
||||
// Execute
|
||||
cef_point_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetPosition();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_get_preferred_size(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetPreferredSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_size_to_preferred_size(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SizeToPreferredSize();
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_get_minimum_size(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetMinimumSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_get_maximum_size(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetMaximumSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_get_height_for_width(struct _cef_view_t* self,
|
||||
int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->GetHeightForWidth(
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_invalidate_layout(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->InvalidateLayout();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_visible(struct _cef_view_t* self,
|
||||
int visible) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetVisible(
|
||||
visible?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_visible(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsVisible();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_drawn(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsDrawn();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_enabled(struct _cef_view_t* self,
|
||||
int enabled) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetEnabled(
|
||||
enabled?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_enabled(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsEnabled();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_focusable(struct _cef_view_t* self,
|
||||
int focusable) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetFocusable(
|
||||
focusable?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_focusable(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsFocusable();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_is_accessibility_focusable(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->IsAccessibilityFocusable();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_request_focus(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->RequestFocus();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_set_background_color(struct _cef_view_t* self,
|
||||
cef_color_t color) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewCppToC::Get(reinterpret_cast<cef_browser_view_t*>(
|
||||
self))->SetBackgroundColor(
|
||||
color);
|
||||
}
|
||||
|
||||
cef_color_t CEF_CALLBACK browser_view_get_background_color(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
cef_color_t _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->GetBackgroundColor();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_convert_point_to_screen(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ConvertPointToScreen(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_convert_point_from_screen(
|
||||
struct _cef_view_t* self, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ConvertPointFromScreen(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_convert_point_to_window(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ConvertPointToWindow(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_convert_point_from_window(
|
||||
struct _cef_view_t* self, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ConvertPointFromWindow(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_convert_point_to_view(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ConvertPointToView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_convert_point_from_view(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_t*>(self))->ConvertPointFromView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBrowserViewCppToC::CefBrowserViewCppToC() {
|
||||
GetStruct()->get_browser = browser_view_get_browser;
|
||||
GetStruct()->base.as_browser_view = browser_view_as_browser_view;
|
||||
GetStruct()->base.as_button = browser_view_as_button;
|
||||
GetStruct()->base.as_panel = browser_view_as_panel;
|
||||
GetStruct()->base.as_scroll_view = browser_view_as_scroll_view;
|
||||
GetStruct()->base.as_textfield = browser_view_as_textfield;
|
||||
GetStruct()->base.get_type_string = browser_view_get_type_string;
|
||||
GetStruct()->base.to_string = browser_view_to_string;
|
||||
GetStruct()->base.is_valid = browser_view_is_valid;
|
||||
GetStruct()->base.is_attached = browser_view_is_attached;
|
||||
GetStruct()->base.is_same = browser_view_is_same;
|
||||
GetStruct()->base.get_delegate = browser_view_get_delegate;
|
||||
GetStruct()->base.get_window = browser_view_get_window;
|
||||
GetStruct()->base.get_id = browser_view_get_id;
|
||||
GetStruct()->base.set_id = browser_view_set_id;
|
||||
GetStruct()->base.get_parent_view = browser_view_get_parent_view;
|
||||
GetStruct()->base.get_view_for_id = browser_view_get_view_for_id;
|
||||
GetStruct()->base.set_bounds = browser_view_set_bounds;
|
||||
GetStruct()->base.get_bounds = browser_view_get_bounds;
|
||||
GetStruct()->base.get_bounds_in_screen = browser_view_get_bounds_in_screen;
|
||||
GetStruct()->base.set_size = browser_view_set_size;
|
||||
GetStruct()->base.get_size = browser_view_get_size;
|
||||
GetStruct()->base.set_position = browser_view_set_position;
|
||||
GetStruct()->base.get_position = browser_view_get_position;
|
||||
GetStruct()->base.get_preferred_size = browser_view_get_preferred_size;
|
||||
GetStruct()->base.size_to_preferred_size =
|
||||
browser_view_size_to_preferred_size;
|
||||
GetStruct()->base.get_minimum_size = browser_view_get_minimum_size;
|
||||
GetStruct()->base.get_maximum_size = browser_view_get_maximum_size;
|
||||
GetStruct()->base.get_height_for_width = browser_view_get_height_for_width;
|
||||
GetStruct()->base.invalidate_layout = browser_view_invalidate_layout;
|
||||
GetStruct()->base.set_visible = browser_view_set_visible;
|
||||
GetStruct()->base.is_visible = browser_view_is_visible;
|
||||
GetStruct()->base.is_drawn = browser_view_is_drawn;
|
||||
GetStruct()->base.set_enabled = browser_view_set_enabled;
|
||||
GetStruct()->base.is_enabled = browser_view_is_enabled;
|
||||
GetStruct()->base.set_focusable = browser_view_set_focusable;
|
||||
GetStruct()->base.is_focusable = browser_view_is_focusable;
|
||||
GetStruct()->base.is_accessibility_focusable =
|
||||
browser_view_is_accessibility_focusable;
|
||||
GetStruct()->base.request_focus = browser_view_request_focus;
|
||||
GetStruct()->base.set_background_color = browser_view_set_background_color;
|
||||
GetStruct()->base.get_background_color = browser_view_get_background_color;
|
||||
GetStruct()->base.convert_point_to_screen =
|
||||
browser_view_convert_point_to_screen;
|
||||
GetStruct()->base.convert_point_from_screen =
|
||||
browser_view_convert_point_from_screen;
|
||||
GetStruct()->base.convert_point_to_window =
|
||||
browser_view_convert_point_to_window;
|
||||
GetStruct()->base.convert_point_from_window =
|
||||
browser_view_convert_point_from_window;
|
||||
GetStruct()->base.convert_point_to_view = browser_view_convert_point_to_view;
|
||||
GetStruct()->base.convert_point_from_view =
|
||||
browser_view_convert_point_from_view;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBrowserView> CefCppToC<CefBrowserViewCppToC,
|
||||
CefBrowserView, cef_browser_view_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_browser_view_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserViewCppToC, CefBrowserView,
|
||||
cef_browser_view_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBrowserViewCppToC, CefBrowserView,
|
||||
cef_browser_view_t>::kWrapperType = WT_BROWSER_VIEW;
|
35
libcef_dll/cpptoc/views/browser_view_cpptoc.h
Normal file
35
libcef_dll/cpptoc/views/browser_view_cpptoc.h
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_browser_view.h"
|
||||
#include "include/capi/views/cef_browser_view_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefBrowserViewCppToC
|
||||
: public CefCppToC<CefBrowserViewCppToC, CefBrowserView,
|
||||
cef_browser_view_t> {
|
||||
public:
|
||||
CefBrowserViewCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_CPPTOC_H_
|
312
libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc
Normal file
312
libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,312 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/client_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/browser_view_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK browser_view_delegate_on_browser_created(
|
||||
struct _cef_browser_view_delegate_t* self, cef_browser_view_t* browser_view,
|
||||
cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: browser_view; type: refptr_diff
|
||||
DCHECK(browser_view);
|
||||
if (!browser_view)
|
||||
return;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewDelegateCppToC::Get(self)->OnBrowserCreated(
|
||||
CefBrowserViewCToCpp::Wrap(browser_view),
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_delegate_on_browser_destroyed(
|
||||
struct _cef_browser_view_delegate_t* self, cef_browser_view_t* browser_view,
|
||||
cef_browser_t* browser) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: browser_view; type: refptr_diff
|
||||
DCHECK(browser_view);
|
||||
if (!browser_view)
|
||||
return;
|
||||
// Verify param: browser; type: refptr_diff
|
||||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewDelegateCppToC::Get(self)->OnBrowserDestroyed(
|
||||
CefBrowserViewCToCpp::Wrap(browser_view),
|
||||
CefBrowserCToCpp::Wrap(browser));
|
||||
}
|
||||
|
||||
cef_browser_view_delegate_t* CEF_CALLBACK browser_view_delegate_get_delegate_for_popup_browser_view(
|
||||
struct _cef_browser_view_delegate_t* self, cef_browser_view_t* browser_view,
|
||||
const struct _cef_browser_settings_t* settings, cef_client_t* client,
|
||||
int is_devtools) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
// Verify param: browser_view; type: refptr_diff
|
||||
DCHECK(browser_view);
|
||||
if (!browser_view)
|
||||
return NULL;
|
||||
// Verify param: settings; type: struct_byref_const
|
||||
DCHECK(settings);
|
||||
if (!settings)
|
||||
return NULL;
|
||||
// Verify param: client; type: refptr_same
|
||||
DCHECK(client);
|
||||
if (!client)
|
||||
return NULL;
|
||||
|
||||
// Translate param: settings; type: struct_byref_const
|
||||
CefBrowserSettings settingsObj;
|
||||
if (settings)
|
||||
settingsObj.Set(*settings, false);
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowserViewDelegate> _retval = CefBrowserViewDelegateCppToC::Get(
|
||||
self)->GetDelegateForPopupBrowserView(
|
||||
CefBrowserViewCToCpp::Wrap(browser_view),
|
||||
settingsObj,
|
||||
CefClientCppToC::Unwrap(client),
|
||||
is_devtools?true:false);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserViewDelegateCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_delegate_on_popup_browser_view_created(
|
||||
struct _cef_browser_view_delegate_t* self, cef_browser_view_t* browser_view,
|
||||
cef_browser_view_t* popup_browser_view, int is_devtools) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: browser_view; type: refptr_diff
|
||||
DCHECK(browser_view);
|
||||
if (!browser_view)
|
||||
return 0;
|
||||
// Verify param: popup_browser_view; type: refptr_diff
|
||||
DCHECK(popup_browser_view);
|
||||
if (!popup_browser_view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefBrowserViewDelegateCppToC::Get(
|
||||
self)->OnPopupBrowserViewCreated(
|
||||
CefBrowserViewCToCpp::Wrap(browser_view),
|
||||
CefBrowserViewCToCpp::Wrap(popup_browser_view),
|
||||
is_devtools?true:false);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(self))->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(self))->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK browser_view_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(self))->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK browser_view_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(self))->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(
|
||||
self))->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK browser_view_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefBrowserViewDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(self))->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefBrowserViewDelegateCppToC::CefBrowserViewDelegateCppToC() {
|
||||
GetStruct()->on_browser_created = browser_view_delegate_on_browser_created;
|
||||
GetStruct()->on_browser_destroyed =
|
||||
browser_view_delegate_on_browser_destroyed;
|
||||
GetStruct()->get_delegate_for_popup_browser_view =
|
||||
browser_view_delegate_get_delegate_for_popup_browser_view;
|
||||
GetStruct()->on_popup_browser_view_created =
|
||||
browser_view_delegate_on_popup_browser_view_created;
|
||||
GetStruct()->base.get_preferred_size =
|
||||
browser_view_delegate_get_preferred_size;
|
||||
GetStruct()->base.get_minimum_size = browser_view_delegate_get_minimum_size;
|
||||
GetStruct()->base.get_maximum_size = browser_view_delegate_get_maximum_size;
|
||||
GetStruct()->base.get_height_for_width =
|
||||
browser_view_delegate_get_height_for_width;
|
||||
GetStruct()->base.on_parent_view_changed =
|
||||
browser_view_delegate_on_parent_view_changed;
|
||||
GetStruct()->base.on_child_view_changed =
|
||||
browser_view_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefBrowserViewDelegate> CefCppToC<CefBrowserViewDelegateCppToC,
|
||||
CefBrowserViewDelegate, cef_browser_view_delegate_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_browser_view_delegate_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefBrowserViewDelegateCppToC,
|
||||
CefBrowserViewDelegate, cef_browser_view_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefBrowserViewDelegateCppToC,
|
||||
CefBrowserViewDelegate, cef_browser_view_delegate_t>::kWrapperType =
|
||||
WT_BROWSER_VIEW_DELEGATE;
|
39
libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h
Normal file
39
libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_browser_view_delegate.h"
|
||||
#include "include/capi/views/cef_browser_view_delegate_capi.h"
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/capi/cef_browser_capi.h"
|
||||
#include "include/views/cef_browser_view.h"
|
||||
#include "include/capi/views/cef_browser_view_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefBrowserViewDelegateCppToC
|
||||
: public CefCppToC<CefBrowserViewDelegateCppToC, CefBrowserViewDelegate,
|
||||
cef_browser_view_delegate_t> {
|
||||
public:
|
||||
CefBrowserViewDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_BROWSER_VIEW_DELEGATE_CPPTOC_H_
|
975
libcef_dll/cpptoc/views/button_cpptoc.cc
Normal file
975
libcef_dll/cpptoc/views/button_cpptoc.cc
Normal file
@@ -0,0 +1,975 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_label_button_t* CEF_CALLBACK button_as_label_button(
|
||||
struct _cef_button_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefLabelButton> _retval = CefButtonCppToC::Get(self)->AsLabelButton(
|
||||
);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLabelButtonCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_state(struct _cef_button_t* self,
|
||||
cef_button_state_t state) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(self)->SetState(
|
||||
state);
|
||||
}
|
||||
|
||||
cef_button_state_t CEF_CALLBACK button_get_state(struct _cef_button_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CEF_BUTTON_STATE_NORMAL;
|
||||
|
||||
// Execute
|
||||
cef_button_state_t _retval = CefButtonCppToC::Get(self)->GetState();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_tooltip_text(struct _cef_button_t* self,
|
||||
const cef_string_t* tooltip_text) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: tooltip_text; type: string_byref_const
|
||||
DCHECK(tooltip_text);
|
||||
if (!tooltip_text)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(self)->SetTooltipText(
|
||||
CefString(tooltip_text));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_accessible_name(struct _cef_button_t* self,
|
||||
const cef_string_t* name) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: name; type: string_byref_const
|
||||
DCHECK(name);
|
||||
if (!name)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(self)->SetAccessibleName(
|
||||
CefString(name));
|
||||
}
|
||||
|
||||
cef_browser_view_t* CEF_CALLBACK button_as_browser_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowserView> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->AsBrowserView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_button_t* CEF_CALLBACK button_as_button(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefButton> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->AsButton();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefButtonCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_panel_t* CEF_CALLBACK button_as_panel(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefPanel> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->AsPanel();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPanelCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_scroll_view_t* CEF_CALLBACK button_as_scroll_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefScrollView> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->AsScrollView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefScrollViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_textfield_t* CEF_CALLBACK button_as_textfield(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefTextfield> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->AsTextfield();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefTextfieldCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK button_get_type_string(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetTypeString();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK button_to_string(struct _cef_view_t* self,
|
||||
int include_children) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ToString(
|
||||
include_children?true:false);
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_valid(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsValid();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_attached(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsAttached();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_same(struct _cef_view_t* self,
|
||||
struct _cef_view_t* that) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that);
|
||||
if (!that)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsSame(
|
||||
CefViewCppToC::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_view_delegate_t* CEF_CALLBACK button_get_delegate(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefViewDelegate> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->GetDelegate();
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefViewDelegateCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_window_t* CEF_CALLBACK button_get_window(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefWindow> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->GetWindow();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefWindowCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_get_id(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetID();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_id(struct _cef_view_t* self, int id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetID(
|
||||
id);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK button_get_parent_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefView> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->GetParentView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK button_get_view_for_id(
|
||||
struct _cef_view_t* self, int id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefView> _retval = CefButtonCppToC::Get(
|
||||
reinterpret_cast<cef_button_t*>(self))->GetViewForID(
|
||||
id);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_bounds(struct _cef_view_t* self,
|
||||
const cef_rect_t* bounds) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: bounds; type: simple_byref_const
|
||||
DCHECK(bounds);
|
||||
if (!bounds)
|
||||
return;
|
||||
|
||||
// Translate param: bounds; type: simple_byref_const
|
||||
CefRect boundsVal = bounds?*bounds:CefRect();
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetBounds(
|
||||
boundsVal);
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK button_get_bounds(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetBounds();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK button_get_bounds_in_screen(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetBoundsInScreen();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_size(struct _cef_view_t* self,
|
||||
const cef_size_t* size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: size; type: simple_byref_const
|
||||
DCHECK(size);
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
// Translate param: size; type: simple_byref_const
|
||||
CefSize sizeVal = size?*size:CefSize();
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetSize(
|
||||
sizeVal);
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_get_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_position(struct _cef_view_t* self,
|
||||
const cef_point_t* position) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: position; type: simple_byref_const
|
||||
DCHECK(position);
|
||||
if (!position)
|
||||
return;
|
||||
|
||||
// Translate param: position; type: simple_byref_const
|
||||
CefPoint positionVal = position?*position:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetPosition(
|
||||
positionVal);
|
||||
}
|
||||
|
||||
cef_point_t CEF_CALLBACK button_get_position(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefPoint();
|
||||
|
||||
// Execute
|
||||
cef_point_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetPosition();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_get_preferred_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetPreferredSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_size_to_preferred_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->SizeToPreferredSize();
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_get_minimum_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetMinimumSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_get_maximum_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetMaximumSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_get_height_for_width(struct _cef_view_t* self,
|
||||
int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetHeightForWidth(
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_invalidate_layout(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->InvalidateLayout(
|
||||
);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_visible(struct _cef_view_t* self, int visible) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetVisible(
|
||||
visible?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_visible(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsVisible();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_drawn(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsDrawn();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_enabled(struct _cef_view_t* self, int enabled) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetEnabled(
|
||||
enabled?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_enabled(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsEnabled();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_focusable(struct _cef_view_t* self,
|
||||
int focusable) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->SetFocusable(
|
||||
focusable?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_focusable(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsFocusable();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_is_accessibility_focusable(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->IsAccessibilityFocusable();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_request_focus(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(self))->RequestFocus();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_set_background_color(struct _cef_view_t* self,
|
||||
cef_color_t color) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->SetBackgroundColor(
|
||||
color);
|
||||
}
|
||||
|
||||
cef_color_t CEF_CALLBACK button_get_background_color(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
cef_color_t _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->GetBackgroundColor();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_convert_point_to_screen(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ConvertPointToScreen(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_convert_point_from_screen(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ConvertPointFromScreen(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_convert_point_to_window(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ConvertPointToWindow(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_convert_point_from_window(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ConvertPointFromWindow(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_convert_point_to_view(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ConvertPointToView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_convert_point_from_view(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefButtonCppToC::Get(reinterpret_cast<cef_button_t*>(
|
||||
self))->ConvertPointFromView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefButtonCppToC::CefButtonCppToC() {
|
||||
GetStruct()->as_label_button = button_as_label_button;
|
||||
GetStruct()->set_state = button_set_state;
|
||||
GetStruct()->get_state = button_get_state;
|
||||
GetStruct()->set_tooltip_text = button_set_tooltip_text;
|
||||
GetStruct()->set_accessible_name = button_set_accessible_name;
|
||||
GetStruct()->base.as_browser_view = button_as_browser_view;
|
||||
GetStruct()->base.as_button = button_as_button;
|
||||
GetStruct()->base.as_panel = button_as_panel;
|
||||
GetStruct()->base.as_scroll_view = button_as_scroll_view;
|
||||
GetStruct()->base.as_textfield = button_as_textfield;
|
||||
GetStruct()->base.get_type_string = button_get_type_string;
|
||||
GetStruct()->base.to_string = button_to_string;
|
||||
GetStruct()->base.is_valid = button_is_valid;
|
||||
GetStruct()->base.is_attached = button_is_attached;
|
||||
GetStruct()->base.is_same = button_is_same;
|
||||
GetStruct()->base.get_delegate = button_get_delegate;
|
||||
GetStruct()->base.get_window = button_get_window;
|
||||
GetStruct()->base.get_id = button_get_id;
|
||||
GetStruct()->base.set_id = button_set_id;
|
||||
GetStruct()->base.get_parent_view = button_get_parent_view;
|
||||
GetStruct()->base.get_view_for_id = button_get_view_for_id;
|
||||
GetStruct()->base.set_bounds = button_set_bounds;
|
||||
GetStruct()->base.get_bounds = button_get_bounds;
|
||||
GetStruct()->base.get_bounds_in_screen = button_get_bounds_in_screen;
|
||||
GetStruct()->base.set_size = button_set_size;
|
||||
GetStruct()->base.get_size = button_get_size;
|
||||
GetStruct()->base.set_position = button_set_position;
|
||||
GetStruct()->base.get_position = button_get_position;
|
||||
GetStruct()->base.get_preferred_size = button_get_preferred_size;
|
||||
GetStruct()->base.size_to_preferred_size = button_size_to_preferred_size;
|
||||
GetStruct()->base.get_minimum_size = button_get_minimum_size;
|
||||
GetStruct()->base.get_maximum_size = button_get_maximum_size;
|
||||
GetStruct()->base.get_height_for_width = button_get_height_for_width;
|
||||
GetStruct()->base.invalidate_layout = button_invalidate_layout;
|
||||
GetStruct()->base.set_visible = button_set_visible;
|
||||
GetStruct()->base.is_visible = button_is_visible;
|
||||
GetStruct()->base.is_drawn = button_is_drawn;
|
||||
GetStruct()->base.set_enabled = button_set_enabled;
|
||||
GetStruct()->base.is_enabled = button_is_enabled;
|
||||
GetStruct()->base.set_focusable = button_set_focusable;
|
||||
GetStruct()->base.is_focusable = button_is_focusable;
|
||||
GetStruct()->base.is_accessibility_focusable =
|
||||
button_is_accessibility_focusable;
|
||||
GetStruct()->base.request_focus = button_request_focus;
|
||||
GetStruct()->base.set_background_color = button_set_background_color;
|
||||
GetStruct()->base.get_background_color = button_get_background_color;
|
||||
GetStruct()->base.convert_point_to_screen = button_convert_point_to_screen;
|
||||
GetStruct()->base.convert_point_from_screen =
|
||||
button_convert_point_from_screen;
|
||||
GetStruct()->base.convert_point_to_window = button_convert_point_to_window;
|
||||
GetStruct()->base.convert_point_from_window =
|
||||
button_convert_point_from_window;
|
||||
GetStruct()->base.convert_point_to_view = button_convert_point_to_view;
|
||||
GetStruct()->base.convert_point_from_view = button_convert_point_from_view;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefButton> CefCppToC<CefButtonCppToC, CefButton,
|
||||
cef_button_t>::UnwrapDerived(CefWrapperType type, cef_button_t* s) {
|
||||
if (type == WT_LABEL_BUTTON) {
|
||||
return CefLabelButtonCppToC::Unwrap(reinterpret_cast<cef_label_button_t*>(
|
||||
s));
|
||||
}
|
||||
if (type == WT_MENU_BUTTON) {
|
||||
return CefMenuButtonCppToC::Unwrap(reinterpret_cast<cef_menu_button_t*>(s));
|
||||
}
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefButtonCppToC, CefButton,
|
||||
cef_button_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefButtonCppToC, CefButton,
|
||||
cef_button_t>::kWrapperType = WT_BUTTON;
|
36
libcef_dll/cpptoc/views/button_cpptoc.h
Normal file
36
libcef_dll/cpptoc/views/button_cpptoc.h
Normal file
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_button.h"
|
||||
#include "include/capi/views/cef_button_capi.h"
|
||||
#include "include/views/cef_label_button.h"
|
||||
#include "include/capi/views/cef_label_button_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefButtonCppToC
|
||||
: public CefCppToC<CefButtonCppToC, CefButton, cef_button_t> {
|
||||
public:
|
||||
CefButtonCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_CPPTOC_H_
|
209
libcef_dll/cpptoc/views/button_delegate_cpptoc.cc
Normal file
209
libcef_dll/cpptoc/views/button_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,209 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK button_delegate_on_button_pressed(
|
||||
struct _cef_button_delegate_t* self, cef_button_t* button) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: button; type: refptr_diff
|
||||
DCHECK(button);
|
||||
if (!button)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonDelegateCppToC::Get(self)->OnButtonPressed(
|
||||
CefButtonCToCpp::Wrap(button));
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_button_delegate_t*>(self))->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_button_delegate_t*>(self))->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK button_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_button_delegate_t*>(self))->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK button_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_button_delegate_t*>(self))->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonDelegateCppToC::Get(reinterpret_cast<cef_button_delegate_t*>(
|
||||
self))->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK button_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefButtonDelegateCppToC::Get(reinterpret_cast<cef_button_delegate_t*>(
|
||||
self))->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefButtonDelegateCppToC::CefButtonDelegateCppToC() {
|
||||
GetStruct()->on_button_pressed = button_delegate_on_button_pressed;
|
||||
GetStruct()->base.get_preferred_size = button_delegate_get_preferred_size;
|
||||
GetStruct()->base.get_minimum_size = button_delegate_get_minimum_size;
|
||||
GetStruct()->base.get_maximum_size = button_delegate_get_maximum_size;
|
||||
GetStruct()->base.get_height_for_width = button_delegate_get_height_for_width;
|
||||
GetStruct()->base.on_parent_view_changed =
|
||||
button_delegate_on_parent_view_changed;
|
||||
GetStruct()->base.on_child_view_changed =
|
||||
button_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefButtonDelegate> CefCppToC<CefButtonDelegateCppToC,
|
||||
CefButtonDelegate, cef_button_delegate_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_button_delegate_t* s) {
|
||||
if (type == WT_MENU_BUTTON_DELEGATE) {
|
||||
return CefMenuButtonDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(s));
|
||||
}
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefButtonDelegateCppToC,
|
||||
CefButtonDelegate, cef_button_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefButtonDelegateCppToC, CefButtonDelegate,
|
||||
cef_button_delegate_t>::kWrapperType = WT_BUTTON_DELEGATE;
|
37
libcef_dll/cpptoc/views/button_delegate_cpptoc.h
Normal file
37
libcef_dll/cpptoc/views/button_delegate_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_button_delegate.h"
|
||||
#include "include/capi/views/cef_button_delegate_capi.h"
|
||||
#include "include/views/cef_button.h"
|
||||
#include "include/capi/views/cef_button_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefButtonDelegateCppToC
|
||||
: public CefCppToC<CefButtonDelegateCppToC, CefButtonDelegate,
|
||||
cef_button_delegate_t> {
|
||||
public:
|
||||
CefButtonDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_BUTTON_DELEGATE_CPPTOC_H_
|
264
libcef_dll/cpptoc/views/display_cpptoc.cc
Normal file
264
libcef_dll/cpptoc/views/display_cpptoc.cc
Normal file
@@ -0,0 +1,264 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include <algorithm>
|
||||
#include "libcef_dll/cpptoc/views/display_cpptoc.h"
|
||||
|
||||
|
||||
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
CEF_EXPORT cef_display_t* cef_display_get_primary() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDisplay> _retval = CefDisplay::GetPrimaryDisplay();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDisplayCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
CEF_EXPORT cef_display_t* cef_display_get_nearest_point(
|
||||
const cef_point_t* point, int input_pixel_coords) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: point; type: simple_byref_const
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return NULL;
|
||||
|
||||
// Translate param: point; type: simple_byref_const
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDisplay> _retval = CefDisplay::GetDisplayNearestPoint(
|
||||
pointVal,
|
||||
input_pixel_coords?true:false);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDisplayCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
CEF_EXPORT cef_display_t* cef_display_get_matching_bounds(
|
||||
const cef_rect_t* bounds, int input_pixel_coords) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: bounds; type: simple_byref_const
|
||||
DCHECK(bounds);
|
||||
if (!bounds)
|
||||
return NULL;
|
||||
|
||||
// Translate param: bounds; type: simple_byref_const
|
||||
CefRect boundsVal = bounds?*bounds:CefRect();
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefDisplay> _retval = CefDisplay::GetDisplayMatchingBounds(
|
||||
boundsVal,
|
||||
input_pixel_coords?true:false);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDisplayCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
CEF_EXPORT size_t cef_display_get_count() {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
size_t _retval = CefDisplay::GetDisplayCount();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
CEF_EXPORT void cef_display_get_alls(size_t* displaysCount,
|
||||
cef_display_t** displays) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Verify param: displays; type: refptr_vec_same_byref
|
||||
DCHECK(displaysCount && (*displaysCount == 0 || displays));
|
||||
if (!displaysCount || (*displaysCount > 0 && !displays))
|
||||
return;
|
||||
|
||||
// Translate param: displays; type: refptr_vec_same_byref
|
||||
std::vector<CefRefPtr<CefDisplay> > displaysList;
|
||||
if (displaysCount && *displaysCount > 0 && displays) {
|
||||
for (size_t i = 0; i < *displaysCount; ++i) {
|
||||
displaysList.push_back(CefDisplayCppToC::Unwrap(displays[i]));
|
||||
}
|
||||
}
|
||||
|
||||
// Execute
|
||||
CefDisplay::GetAllDisplays(
|
||||
displaysList);
|
||||
|
||||
// Restore param: displays; type: refptr_vec_same_byref
|
||||
if (displaysCount && displays) {
|
||||
*displaysCount = std::min(displaysList.size(), *displaysCount);
|
||||
if (*displaysCount > 0) {
|
||||
for (size_t i = 0; i < *displaysCount; ++i) {
|
||||
displays[i] = CefDisplayCppToC::Wrap(displaysList[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int64 CEF_CALLBACK display_get_id(struct _cef_display_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int64 _retval = CefDisplayCppToC::Get(self)->GetID();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
float CEF_CALLBACK display_get_device_scale_factor(
|
||||
struct _cef_display_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
float _retval = CefDisplayCppToC::Get(self)->GetDeviceScaleFactor();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK display_convert_point_to_pixels(struct _cef_display_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefDisplayCppToC::Get(self)->ConvertPointToPixels(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK display_convert_point_from_pixels(struct _cef_display_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefDisplayCppToC::Get(self)->ConvertPointFromPixels(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK display_get_bounds(struct _cef_display_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefDisplayCppToC::Get(self)->GetBounds();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK display_get_work_area(struct _cef_display_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefDisplayCppToC::Get(self)->GetWorkArea();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK display_get_rotation(struct _cef_display_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefDisplayCppToC::Get(self)->GetRotation();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefDisplayCppToC::CefDisplayCppToC() {
|
||||
GetStruct()->get_id = display_get_id;
|
||||
GetStruct()->get_device_scale_factor = display_get_device_scale_factor;
|
||||
GetStruct()->convert_point_to_pixels = display_convert_point_to_pixels;
|
||||
GetStruct()->convert_point_from_pixels = display_convert_point_from_pixels;
|
||||
GetStruct()->get_bounds = display_get_bounds;
|
||||
GetStruct()->get_work_area = display_get_work_area;
|
||||
GetStruct()->get_rotation = display_get_rotation;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefDisplay> CefCppToC<CefDisplayCppToC, CefDisplay,
|
||||
cef_display_t>::UnwrapDerived(CefWrapperType type, cef_display_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefDisplayCppToC, CefDisplay,
|
||||
cef_display_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefDisplayCppToC, CefDisplay,
|
||||
cef_display_t>::kWrapperType = WT_DISPLAY;
|
34
libcef_dll/cpptoc/views/display_cpptoc.h
Normal file
34
libcef_dll/cpptoc/views/display_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_DISPLAY_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_DISPLAY_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_display.h"
|
||||
#include "include/capi/views/cef_display_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefDisplayCppToC
|
||||
: public CefCppToC<CefDisplayCppToC, CefDisplay, cef_display_t> {
|
||||
public:
|
||||
CefDisplayCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_DISPLAY_CPPTOC_H_
|
92
libcef_dll/cpptoc/views/fill_layout_cpptoc.cc
Normal file
92
libcef_dll/cpptoc/views/fill_layout_cpptoc.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/box_layout_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_box_layout_t* CEF_CALLBACK fill_layout_as_box_layout(
|
||||
struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBoxLayout> _retval = CefFillLayoutCppToC::Get(
|
||||
reinterpret_cast<cef_fill_layout_t*>(self))->AsBoxLayout();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBoxLayoutCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_fill_layout_t* CEF_CALLBACK fill_layout_as_fill_layout(
|
||||
struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefFillLayout> _retval = CefFillLayoutCppToC::Get(
|
||||
reinterpret_cast<cef_fill_layout_t*>(self))->AsFillLayout();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFillLayoutCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK fill_layout_is_valid(struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefFillLayoutCppToC::Get(reinterpret_cast<cef_fill_layout_t*>(
|
||||
self))->IsValid();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefFillLayoutCppToC::CefFillLayoutCppToC() {
|
||||
GetStruct()->base.as_box_layout = fill_layout_as_box_layout;
|
||||
GetStruct()->base.as_fill_layout = fill_layout_as_fill_layout;
|
||||
GetStruct()->base.is_valid = fill_layout_is_valid;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefFillLayout> CefCppToC<CefFillLayoutCppToC,
|
||||
CefFillLayout, cef_fill_layout_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_fill_layout_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefFillLayoutCppToC, CefFillLayout,
|
||||
cef_fill_layout_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefFillLayoutCppToC, CefFillLayout,
|
||||
cef_fill_layout_t>::kWrapperType = WT_FILL_LAYOUT;
|
34
libcef_dll/cpptoc/views/fill_layout_cpptoc.h
Normal file
34
libcef_dll/cpptoc/views/fill_layout_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_FILL_LAYOUT_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_FILL_LAYOUT_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_fill_layout.h"
|
||||
#include "include/capi/views/cef_fill_layout_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefFillLayoutCppToC
|
||||
: public CefCppToC<CefFillLayoutCppToC, CefFillLayout, cef_fill_layout_t> {
|
||||
public:
|
||||
CefFillLayoutCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_FILL_LAYOUT_CPPTOC_H_
|
1217
libcef_dll/cpptoc/views/label_button_cpptoc.cc
Normal file
1217
libcef_dll/cpptoc/views/label_button_cpptoc.cc
Normal file
File diff suppressed because it is too large
Load Diff
37
libcef_dll/cpptoc/views/label_button_cpptoc.h
Normal file
37
libcef_dll/cpptoc/views/label_button_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_LABEL_BUTTON_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_LABEL_BUTTON_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_label_button.h"
|
||||
#include "include/capi/views/cef_label_button_capi.h"
|
||||
#include "include/views/cef_menu_button.h"
|
||||
#include "include/capi/views/cef_menu_button_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefLabelButtonCppToC
|
||||
: public CefCppToC<CefLabelButtonCppToC, CefLabelButton,
|
||||
cef_label_button_t> {
|
||||
public:
|
||||
CefLabelButtonCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_LABEL_BUTTON_CPPTOC_H_
|
95
libcef_dll/cpptoc/views/layout_cpptoc.cc
Normal file
95
libcef_dll/cpptoc/views/layout_cpptoc.cc
Normal file
@@ -0,0 +1,95 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/box_layout_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/fill_layout_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/layout_cpptoc.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_box_layout_t* CEF_CALLBACK layout_as_box_layout(
|
||||
struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBoxLayout> _retval = CefLayoutCppToC::Get(self)->AsBoxLayout();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBoxLayoutCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_fill_layout_t* CEF_CALLBACK layout_as_fill_layout(
|
||||
struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefFillLayout> _retval = CefLayoutCppToC::Get(self)->AsFillLayout();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFillLayoutCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK layout_is_valid(struct _cef_layout_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefLayoutCppToC::Get(self)->IsValid();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefLayoutCppToC::CefLayoutCppToC() {
|
||||
GetStruct()->as_box_layout = layout_as_box_layout;
|
||||
GetStruct()->as_fill_layout = layout_as_fill_layout;
|
||||
GetStruct()->is_valid = layout_is_valid;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefLayout> CefCppToC<CefLayoutCppToC, CefLayout,
|
||||
cef_layout_t>::UnwrapDerived(CefWrapperType type, cef_layout_t* s) {
|
||||
if (type == WT_BOX_LAYOUT) {
|
||||
return CefBoxLayoutCppToC::Unwrap(reinterpret_cast<cef_box_layout_t*>(s));
|
||||
}
|
||||
if (type == WT_FILL_LAYOUT) {
|
||||
return CefFillLayoutCppToC::Unwrap(reinterpret_cast<cef_fill_layout_t*>(s));
|
||||
}
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefLayoutCppToC, CefLayout,
|
||||
cef_layout_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefLayoutCppToC, CefLayout,
|
||||
cef_layout_t>::kWrapperType = WT_LAYOUT;
|
38
libcef_dll/cpptoc/views/layout_cpptoc.h
Normal file
38
libcef_dll/cpptoc/views/layout_cpptoc.h
Normal file
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_LAYOUT_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_LAYOUT_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_layout.h"
|
||||
#include "include/capi/views/cef_layout_capi.h"
|
||||
#include "include/views/cef_box_layout.h"
|
||||
#include "include/capi/views/cef_box_layout_capi.h"
|
||||
#include "include/views/cef_fill_layout.h"
|
||||
#include "include/capi/views/cef_fill_layout_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefLayoutCppToC
|
||||
: public CefCppToC<CefLayoutCppToC, CefLayout, cef_layout_t> {
|
||||
public:
|
||||
CefLayoutCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_LAYOUT_CPPTOC_H_
|
1252
libcef_dll/cpptoc/views/menu_button_cpptoc.cc
Normal file
1252
libcef_dll/cpptoc/views/menu_button_cpptoc.cc
Normal file
File diff suppressed because it is too large
Load Diff
34
libcef_dll/cpptoc/views/menu_button_cpptoc.h
Normal file
34
libcef_dll/cpptoc/views/menu_button_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_menu_button.h"
|
||||
#include "include/capi/views/cef_menu_button_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefMenuButtonCppToC
|
||||
: public CefCppToC<CefMenuButtonCppToC, CefMenuButton, cef_menu_button_t> {
|
||||
public:
|
||||
CefMenuButtonCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_CPPTOC_H_
|
239
libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc
Normal file
239
libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,239 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK menu_button_delegate_on_menu_button_pressed(
|
||||
struct _cef_menu_button_delegate_t* self, cef_menu_button_t* menu_button,
|
||||
const cef_point_t* screen_point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: menu_button; type: refptr_diff
|
||||
DCHECK(menu_button);
|
||||
if (!menu_button)
|
||||
return;
|
||||
// Verify param: screen_point; type: simple_byref_const
|
||||
DCHECK(screen_point);
|
||||
if (!screen_point)
|
||||
return;
|
||||
|
||||
// Translate param: screen_point; type: simple_byref_const
|
||||
CefPoint screen_pointVal = screen_point?*screen_point:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefMenuButtonDelegateCppToC::Get(self)->OnMenuButtonPressed(
|
||||
CefMenuButtonCToCpp::Wrap(menu_button),
|
||||
screen_pointVal);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK menu_button_delegate_on_button_pressed(
|
||||
struct _cef_button_delegate_t* self, cef_button_t* button) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: button; type: refptr_diff
|
||||
DCHECK(button);
|
||||
if (!button)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->OnButtonPressed(
|
||||
CefButtonCToCpp::Wrap(button));
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK menu_button_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK menu_button_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK menu_button_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK menu_button_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK menu_button_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK menu_button_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefMenuButtonDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(self))->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefMenuButtonDelegateCppToC::CefMenuButtonDelegateCppToC() {
|
||||
GetStruct()->on_menu_button_pressed =
|
||||
menu_button_delegate_on_menu_button_pressed;
|
||||
GetStruct()->base.on_button_pressed = menu_button_delegate_on_button_pressed;
|
||||
GetStruct()->base.base.get_preferred_size =
|
||||
menu_button_delegate_get_preferred_size;
|
||||
GetStruct()->base.base.get_minimum_size =
|
||||
menu_button_delegate_get_minimum_size;
|
||||
GetStruct()->base.base.get_maximum_size =
|
||||
menu_button_delegate_get_maximum_size;
|
||||
GetStruct()->base.base.get_height_for_width =
|
||||
menu_button_delegate_get_height_for_width;
|
||||
GetStruct()->base.base.on_parent_view_changed =
|
||||
menu_button_delegate_on_parent_view_changed;
|
||||
GetStruct()->base.base.on_child_view_changed =
|
||||
menu_button_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefMenuButtonDelegate> CefCppToC<CefMenuButtonDelegateCppToC,
|
||||
CefMenuButtonDelegate, cef_menu_button_delegate_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_menu_button_delegate_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefMenuButtonDelegateCppToC,
|
||||
CefMenuButtonDelegate, cef_menu_button_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefMenuButtonDelegateCppToC,
|
||||
CefMenuButtonDelegate, cef_menu_button_delegate_t>::kWrapperType =
|
||||
WT_MENU_BUTTON_DELEGATE;
|
37
libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h
Normal file
37
libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_menu_button_delegate.h"
|
||||
#include "include/capi/views/cef_menu_button_delegate_capi.h"
|
||||
#include "include/views/cef_menu_button.h"
|
||||
#include "include/capi/views/cef_menu_button_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefMenuButtonDelegateCppToC
|
||||
: public CefCppToC<CefMenuButtonDelegateCppToC, CefMenuButtonDelegate,
|
||||
cef_menu_button_delegate_t> {
|
||||
public:
|
||||
CefMenuButtonDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_MENU_BUTTON_DELEGATE_CPPTOC_H_
|
1113
libcef_dll/cpptoc/views/panel_cpptoc.cc
Normal file
1113
libcef_dll/cpptoc/views/panel_cpptoc.cc
Normal file
File diff suppressed because it is too large
Load Diff
42
libcef_dll/cpptoc/views/panel_cpptoc.h
Normal file
42
libcef_dll/cpptoc/views/panel_cpptoc.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_panel.h"
|
||||
#include "include/capi/views/cef_panel_capi.h"
|
||||
#include "include/views/cef_box_layout.h"
|
||||
#include "include/capi/views/cef_box_layout_capi.h"
|
||||
#include "include/views/cef_fill_layout.h"
|
||||
#include "include/capi/views/cef_fill_layout_capi.h"
|
||||
#include "include/views/cef_layout.h"
|
||||
#include "include/capi/views/cef_layout_capi.h"
|
||||
#include "include/views/cef_window.h"
|
||||
#include "include/capi/views/cef_window_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefPanelCppToC
|
||||
: public CefCppToC<CefPanelCppToC, CefPanel, cef_panel_t> {
|
||||
public:
|
||||
CefPanelCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_CPPTOC_H_
|
190
libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc
Normal file
190
libcef_dll/cpptoc/views/panel_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,190 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_size_t CEF_CALLBACK panel_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefPanelDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_panel_delegate_t*>(self))->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK panel_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefPanelDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_panel_delegate_t*>(self))->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK panel_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefPanelDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_panel_delegate_t*>(self))->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK panel_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefPanelDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_panel_delegate_t*>(self))->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK panel_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(
|
||||
self))->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK panel_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefPanelDelegateCppToC::Get(reinterpret_cast<cef_panel_delegate_t*>(
|
||||
self))->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPanelDelegateCppToC::CefPanelDelegateCppToC() {
|
||||
GetStruct()->base.get_preferred_size = panel_delegate_get_preferred_size;
|
||||
GetStruct()->base.get_minimum_size = panel_delegate_get_minimum_size;
|
||||
GetStruct()->base.get_maximum_size = panel_delegate_get_maximum_size;
|
||||
GetStruct()->base.get_height_for_width = panel_delegate_get_height_for_width;
|
||||
GetStruct()->base.on_parent_view_changed =
|
||||
panel_delegate_on_parent_view_changed;
|
||||
GetStruct()->base.on_child_view_changed =
|
||||
panel_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefPanelDelegate> CefCppToC<CefPanelDelegateCppToC,
|
||||
CefPanelDelegate, cef_panel_delegate_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_panel_delegate_t* s) {
|
||||
if (type == WT_WINDOW_DELEGATE) {
|
||||
return CefWindowDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_window_delegate_t*>(s));
|
||||
}
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefPanelDelegateCppToC,
|
||||
CefPanelDelegate, cef_panel_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefPanelDelegateCppToC, CefPanelDelegate,
|
||||
cef_panel_delegate_t>::kWrapperType = WT_PANEL_DELEGATE;
|
35
libcef_dll/cpptoc/views/panel_delegate_cpptoc.h
Normal file
35
libcef_dll/cpptoc/views/panel_delegate_cpptoc.h
Normal file
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_panel_delegate.h"
|
||||
#include "include/capi/views/cef_panel_delegate_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefPanelDelegateCppToC
|
||||
: public CefCppToC<CefPanelDelegateCppToC, CefPanelDelegate,
|
||||
cef_panel_delegate_t> {
|
||||
public:
|
||||
CefPanelDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_PANEL_DELEGATE_CPPTOC_H_
|
1035
libcef_dll/cpptoc/views/scroll_view_cpptoc.cc
Normal file
1035
libcef_dll/cpptoc/views/scroll_view_cpptoc.cc
Normal file
File diff suppressed because it is too large
Load Diff
34
libcef_dll/cpptoc/views/scroll_view_cpptoc.h
Normal file
34
libcef_dll/cpptoc/views/scroll_view_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_SCROLL_VIEW_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_SCROLL_VIEW_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_scroll_view.h"
|
||||
#include "include/capi/views/cef_scroll_view_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefScrollViewCppToC
|
||||
: public CefCppToC<CefScrollViewCppToC, CefScrollView, cef_scroll_view_t> {
|
||||
public:
|
||||
CefScrollViewCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_SCROLL_VIEW_CPPTOC_H_
|
1431
libcef_dll/cpptoc/views/textfield_cpptoc.cc
Normal file
1431
libcef_dll/cpptoc/views/textfield_cpptoc.cc
Normal file
File diff suppressed because it is too large
Load Diff
34
libcef_dll/cpptoc/views/textfield_cpptoc.h
Normal file
34
libcef_dll/cpptoc/views/textfield_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_textfield.h"
|
||||
#include "include/capi/views/cef_textfield_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefTextfieldCppToC
|
||||
: public CefCppToC<CefTextfieldCppToC, CefTextfield, cef_textfield_t> {
|
||||
public:
|
||||
CefTextfieldCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_CPPTOC_H_
|
238
libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc
Normal file
238
libcef_dll/cpptoc/views/textfield_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,238 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
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) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: textfield; type: refptr_diff
|
||||
DCHECK(textfield);
|
||||
if (!textfield)
|
||||
return 0;
|
||||
// Verify param: event; type: struct_byref_const
|
||||
DCHECK(event);
|
||||
if (!event)
|
||||
return 0;
|
||||
|
||||
// Translate param: event; type: struct_byref_const
|
||||
CefKeyEvent eventObj;
|
||||
if (event)
|
||||
eventObj.Set(*event, false);
|
||||
|
||||
// Execute
|
||||
bool _retval = CefTextfieldDelegateCppToC::Get(self)->OnKeyEvent(
|
||||
CefTextfieldCToCpp::Wrap(textfield),
|
||||
eventObj);
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK textfield_delegate_on_after_user_action(
|
||||
struct _cef_textfield_delegate_t* self, cef_textfield_t* textfield) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: textfield; type: refptr_diff
|
||||
DCHECK(textfield);
|
||||
if (!textfield)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefTextfieldDelegateCppToC::Get(self)->OnAfterUserAction(
|
||||
CefTextfieldCToCpp::Wrap(textfield));
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK textfield_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefTextfieldDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_textfield_delegate_t*>(self))->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK textfield_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefTextfieldDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_textfield_delegate_t*>(self))->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK textfield_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefTextfieldDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_textfield_delegate_t*>(self))->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK textfield_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefTextfieldDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_textfield_delegate_t*>(self))->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK textfield_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefTextfieldDelegateCppToC::Get(reinterpret_cast<cef_textfield_delegate_t*>(
|
||||
self))->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK textfield_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefTextfieldDelegateCppToC::Get(reinterpret_cast<cef_textfield_delegate_t*>(
|
||||
self))->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefTextfieldDelegateCppToC::CefTextfieldDelegateCppToC() {
|
||||
GetStruct()->on_key_event = textfield_delegate_on_key_event;
|
||||
GetStruct()->on_after_user_action = textfield_delegate_on_after_user_action;
|
||||
GetStruct()->base.get_preferred_size = textfield_delegate_get_preferred_size;
|
||||
GetStruct()->base.get_minimum_size = textfield_delegate_get_minimum_size;
|
||||
GetStruct()->base.get_maximum_size = textfield_delegate_get_maximum_size;
|
||||
GetStruct()->base.get_height_for_width =
|
||||
textfield_delegate_get_height_for_width;
|
||||
GetStruct()->base.on_parent_view_changed =
|
||||
textfield_delegate_on_parent_view_changed;
|
||||
GetStruct()->base.on_child_view_changed =
|
||||
textfield_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefTextfieldDelegate> CefCppToC<CefTextfieldDelegateCppToC,
|
||||
CefTextfieldDelegate, cef_textfield_delegate_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_textfield_delegate_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefTextfieldDelegateCppToC,
|
||||
CefTextfieldDelegate, cef_textfield_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefTextfieldDelegateCppToC,
|
||||
CefTextfieldDelegate, cef_textfield_delegate_t>::kWrapperType =
|
||||
WT_TEXTFIELD_DELEGATE;
|
37
libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h
Normal file
37
libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_textfield_delegate.h"
|
||||
#include "include/capi/views/cef_textfield_delegate_capi.h"
|
||||
#include "include/views/cef_textfield.h"
|
||||
#include "include/capi/views/cef_textfield_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefTextfieldDelegateCppToC
|
||||
: public CefCppToC<CefTextfieldDelegateCppToC, CefTextfieldDelegate,
|
||||
cef_textfield_delegate_t> {
|
||||
public:
|
||||
CefTextfieldDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_TEXTFIELD_DELEGATE_CPPTOC_H_
|
869
libcef_dll/cpptoc/views/view_cpptoc.cc
Normal file
869
libcef_dll/cpptoc/views/view_cpptoc.cc
Normal file
@@ -0,0 +1,869 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/browser_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/panel_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/scroll_view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/textfield_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/view_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/window_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/view_delegate_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_browser_view_t* CEF_CALLBACK view_as_browser_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefBrowserView> _retval = CefViewCppToC::Get(self)->AsBrowserView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefBrowserViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_button_t* CEF_CALLBACK view_as_button(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefButton> _retval = CefViewCppToC::Get(self)->AsButton();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefButtonCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_panel_t* CEF_CALLBACK view_as_panel(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefPanel> _retval = CefViewCppToC::Get(self)->AsPanel();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefPanelCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_scroll_view_t* CEF_CALLBACK view_as_scroll_view(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefScrollView> _retval = CefViewCppToC::Get(self)->AsScrollView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefScrollViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_textfield_t* CEF_CALLBACK view_as_textfield(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefTextfield> _retval = CefViewCppToC::Get(self)->AsTextfield();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefTextfieldCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK view_get_type_string(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefViewCppToC::Get(self)->GetTypeString();
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK view_to_string(struct _cef_view_t* self,
|
||||
int include_children) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefString _retval = CefViewCppToC::Get(self)->ToString(
|
||||
include_children?true:false);
|
||||
|
||||
// Return type: string
|
||||
return _retval.DetachToUserFree();
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_valid(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsValid();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_attached(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsAttached();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_same(struct _cef_view_t* self,
|
||||
struct _cef_view_t* that) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: that; type: refptr_same
|
||||
DCHECK(that);
|
||||
if (!that)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsSame(
|
||||
CefViewCppToC::Unwrap(that));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
struct _cef_view_delegate_t* CEF_CALLBACK view_get_delegate(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefViewDelegate> _retval = CefViewCppToC::Get(self)->GetDelegate();
|
||||
|
||||
// Return type: refptr_diff
|
||||
return CefViewDelegateCToCpp::Unwrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_window_t* CEF_CALLBACK view_get_window(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefWindow> _retval = CefViewCppToC::Get(self)->GetWindow();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefWindowCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_get_id(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefViewCppToC::Get(self)->GetID();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_id(struct _cef_view_t* self, int id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetID(
|
||||
id);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK view_get_parent_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefView> _retval = CefViewCppToC::Get(self)->GetParentView();
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK view_get_view_for_id(struct _cef_view_t* self,
|
||||
int id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return NULL;
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefView> _retval = CefViewCppToC::Get(self)->GetViewForID(
|
||||
id);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefViewCppToC::Wrap(_retval);
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_bounds(struct _cef_view_t* self,
|
||||
const cef_rect_t* bounds) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: bounds; type: simple_byref_const
|
||||
DCHECK(bounds);
|
||||
if (!bounds)
|
||||
return;
|
||||
|
||||
// Translate param: bounds; type: simple_byref_const
|
||||
CefRect boundsVal = bounds?*bounds:CefRect();
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetBounds(
|
||||
boundsVal);
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK view_get_bounds(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefViewCppToC::Get(self)->GetBounds();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_rect_t CEF_CALLBACK view_get_bounds_in_screen(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefRect();
|
||||
|
||||
// Execute
|
||||
cef_rect_t _retval = CefViewCppToC::Get(self)->GetBoundsInScreen();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_size(struct _cef_view_t* self,
|
||||
const cef_size_t* size) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: size; type: simple_byref_const
|
||||
DCHECK(size);
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
// Translate param: size; type: simple_byref_const
|
||||
CefSize sizeVal = size?*size:CefSize();
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetSize(
|
||||
sizeVal);
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_get_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewCppToC::Get(self)->GetSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_position(struct _cef_view_t* self,
|
||||
const cef_point_t* position) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: position; type: simple_byref_const
|
||||
DCHECK(position);
|
||||
if (!position)
|
||||
return;
|
||||
|
||||
// Translate param: position; type: simple_byref_const
|
||||
CefPoint positionVal = position?*position:CefPoint();
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetPosition(
|
||||
positionVal);
|
||||
}
|
||||
|
||||
cef_point_t CEF_CALLBACK view_get_position(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefPoint();
|
||||
|
||||
// Execute
|
||||
cef_point_t _retval = CefViewCppToC::Get(self)->GetPosition();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_get_preferred_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewCppToC::Get(self)->GetPreferredSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_size_to_preferred_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SizeToPreferredSize();
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_get_minimum_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewCppToC::Get(self)->GetMinimumSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_get_maximum_size(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewCppToC::Get(self)->GetMaximumSize();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_get_height_for_width(struct _cef_view_t* self,
|
||||
int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefViewCppToC::Get(self)->GetHeightForWidth(
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_invalidate_layout(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->InvalidateLayout();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_visible(struct _cef_view_t* self, int visible) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetVisible(
|
||||
visible?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_visible(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsVisible();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_drawn(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsDrawn();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_enabled(struct _cef_view_t* self, int enabled) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetEnabled(
|
||||
enabled?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_enabled(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsEnabled();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_focusable(struct _cef_view_t* self, int focusable) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetFocusable(
|
||||
focusable?true:false);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_focusable(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsFocusable();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_is_accessibility_focusable(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->IsAccessibilityFocusable();
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_request_focus(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->RequestFocus();
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_set_background_color(struct _cef_view_t* self,
|
||||
cef_color_t color) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewCppToC::Get(self)->SetBackgroundColor(
|
||||
color);
|
||||
}
|
||||
|
||||
cef_color_t CEF_CALLBACK view_get_background_color(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
cef_color_t _retval = CefViewCppToC::Get(self)->GetBackgroundColor();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_convert_point_to_screen(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->ConvertPointToScreen(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_convert_point_from_screen(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->ConvertPointFromScreen(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_convert_point_to_window(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->ConvertPointToWindow(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_convert_point_from_window(struct _cef_view_t* self,
|
||||
cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->ConvertPointFromWindow(
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_convert_point_to_view(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->ConvertPointToView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_convert_point_from_view(struct _cef_view_t* self,
|
||||
struct _cef_view_t* view, cef_point_t* point) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_same
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
// Verify param: point; type: simple_byref
|
||||
DCHECK(point);
|
||||
if (!point)
|
||||
return 0;
|
||||
|
||||
// Translate param: point; type: simple_byref
|
||||
CefPoint pointVal = point?*point:CefPoint();
|
||||
|
||||
// Execute
|
||||
bool _retval = CefViewCppToC::Get(self)->ConvertPointFromView(
|
||||
CefViewCppToC::Unwrap(view),
|
||||
pointVal);
|
||||
|
||||
// Restore param: point; type: simple_byref
|
||||
if (point)
|
||||
*point = pointVal;
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefViewCppToC::CefViewCppToC() {
|
||||
GetStruct()->as_browser_view = view_as_browser_view;
|
||||
GetStruct()->as_button = view_as_button;
|
||||
GetStruct()->as_panel = view_as_panel;
|
||||
GetStruct()->as_scroll_view = view_as_scroll_view;
|
||||
GetStruct()->as_textfield = view_as_textfield;
|
||||
GetStruct()->get_type_string = view_get_type_string;
|
||||
GetStruct()->to_string = view_to_string;
|
||||
GetStruct()->is_valid = view_is_valid;
|
||||
GetStruct()->is_attached = view_is_attached;
|
||||
GetStruct()->is_same = view_is_same;
|
||||
GetStruct()->get_delegate = view_get_delegate;
|
||||
GetStruct()->get_window = view_get_window;
|
||||
GetStruct()->get_id = view_get_id;
|
||||
GetStruct()->set_id = view_set_id;
|
||||
GetStruct()->get_parent_view = view_get_parent_view;
|
||||
GetStruct()->get_view_for_id = view_get_view_for_id;
|
||||
GetStruct()->set_bounds = view_set_bounds;
|
||||
GetStruct()->get_bounds = view_get_bounds;
|
||||
GetStruct()->get_bounds_in_screen = view_get_bounds_in_screen;
|
||||
GetStruct()->set_size = view_set_size;
|
||||
GetStruct()->get_size = view_get_size;
|
||||
GetStruct()->set_position = view_set_position;
|
||||
GetStruct()->get_position = view_get_position;
|
||||
GetStruct()->get_preferred_size = view_get_preferred_size;
|
||||
GetStruct()->size_to_preferred_size = view_size_to_preferred_size;
|
||||
GetStruct()->get_minimum_size = view_get_minimum_size;
|
||||
GetStruct()->get_maximum_size = view_get_maximum_size;
|
||||
GetStruct()->get_height_for_width = view_get_height_for_width;
|
||||
GetStruct()->invalidate_layout = view_invalidate_layout;
|
||||
GetStruct()->set_visible = view_set_visible;
|
||||
GetStruct()->is_visible = view_is_visible;
|
||||
GetStruct()->is_drawn = view_is_drawn;
|
||||
GetStruct()->set_enabled = view_set_enabled;
|
||||
GetStruct()->is_enabled = view_is_enabled;
|
||||
GetStruct()->set_focusable = view_set_focusable;
|
||||
GetStruct()->is_focusable = view_is_focusable;
|
||||
GetStruct()->is_accessibility_focusable = view_is_accessibility_focusable;
|
||||
GetStruct()->request_focus = view_request_focus;
|
||||
GetStruct()->set_background_color = view_set_background_color;
|
||||
GetStruct()->get_background_color = view_get_background_color;
|
||||
GetStruct()->convert_point_to_screen = view_convert_point_to_screen;
|
||||
GetStruct()->convert_point_from_screen = view_convert_point_from_screen;
|
||||
GetStruct()->convert_point_to_window = view_convert_point_to_window;
|
||||
GetStruct()->convert_point_from_window = view_convert_point_from_window;
|
||||
GetStruct()->convert_point_to_view = view_convert_point_to_view;
|
||||
GetStruct()->convert_point_from_view = view_convert_point_from_view;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefView> CefCppToC<CefViewCppToC, CefView,
|
||||
cef_view_t>::UnwrapDerived(CefWrapperType type, cef_view_t* s) {
|
||||
if (type == WT_BROWSER_VIEW) {
|
||||
return CefBrowserViewCppToC::Unwrap(reinterpret_cast<cef_browser_view_t*>(
|
||||
s));
|
||||
}
|
||||
if (type == WT_BUTTON) {
|
||||
return CefButtonCppToC::Unwrap(reinterpret_cast<cef_button_t*>(s));
|
||||
}
|
||||
if (type == WT_LABEL_BUTTON) {
|
||||
return CefLabelButtonCppToC::Unwrap(reinterpret_cast<cef_label_button_t*>(
|
||||
s));
|
||||
}
|
||||
if (type == WT_MENU_BUTTON) {
|
||||
return CefMenuButtonCppToC::Unwrap(reinterpret_cast<cef_menu_button_t*>(s));
|
||||
}
|
||||
if (type == WT_PANEL) {
|
||||
return CefPanelCppToC::Unwrap(reinterpret_cast<cef_panel_t*>(s));
|
||||
}
|
||||
if (type == WT_SCROLL_VIEW) {
|
||||
return CefScrollViewCppToC::Unwrap(reinterpret_cast<cef_scroll_view_t*>(s));
|
||||
}
|
||||
if (type == WT_TEXTFIELD) {
|
||||
return CefTextfieldCppToC::Unwrap(reinterpret_cast<cef_textfield_t*>(s));
|
||||
}
|
||||
if (type == WT_WINDOW) {
|
||||
return CefWindowCppToC::Unwrap(reinterpret_cast<cef_window_t*>(s));
|
||||
}
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefViewCppToC, CefView,
|
||||
cef_view_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefViewCppToC, CefView,
|
||||
cef_view_t>::kWrapperType = WT_VIEW;
|
46
libcef_dll/cpptoc/views/view_cpptoc.h
Normal file
46
libcef_dll/cpptoc/views/view_cpptoc.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_view.h"
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
#include "include/views/cef_browser_view.h"
|
||||
#include "include/capi/views/cef_browser_view_capi.h"
|
||||
#include "include/views/cef_button.h"
|
||||
#include "include/capi/views/cef_button_capi.h"
|
||||
#include "include/views/cef_panel.h"
|
||||
#include "include/capi/views/cef_panel_capi.h"
|
||||
#include "include/views/cef_scroll_view.h"
|
||||
#include "include/capi/views/cef_scroll_view_capi.h"
|
||||
#include "include/views/cef_textfield.h"
|
||||
#include "include/capi/views/cef_textfield_capi.h"
|
||||
#include "include/views/cef_window.h"
|
||||
#include "include/capi/views/cef_window_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefViewCppToC
|
||||
: public CefCppToC<CefViewCppToC, CefView, cef_view_t> {
|
||||
public:
|
||||
CefViewCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_CPPTOC_H_
|
207
libcef_dll/cpptoc/views/view_delegate_cpptoc.cc
Normal file
207
libcef_dll/cpptoc/views/view_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,207 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/browser_view_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/button_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/menu_button_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/panel_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/textfield_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/view_delegate_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/views/window_delegate_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/views/view_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_size_t CEF_CALLBACK view_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewDelegateCppToC::Get(self)->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewDelegateCppToC::Get(self)->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK view_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefViewDelegateCppToC::Get(self)->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefViewDelegateCppToC::Get(self)->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewDelegateCppToC::Get(self)->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefViewDelegateCppToC::Get(self)->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefViewDelegateCppToC::CefViewDelegateCppToC() {
|
||||
GetStruct()->get_preferred_size = view_delegate_get_preferred_size;
|
||||
GetStruct()->get_minimum_size = view_delegate_get_minimum_size;
|
||||
GetStruct()->get_maximum_size = view_delegate_get_maximum_size;
|
||||
GetStruct()->get_height_for_width = view_delegate_get_height_for_width;
|
||||
GetStruct()->on_parent_view_changed = view_delegate_on_parent_view_changed;
|
||||
GetStruct()->on_child_view_changed = view_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefViewDelegate> CefCppToC<CefViewDelegateCppToC,
|
||||
CefViewDelegate, cef_view_delegate_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_view_delegate_t* s) {
|
||||
if (type == WT_BROWSER_VIEW_DELEGATE) {
|
||||
return CefBrowserViewDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_browser_view_delegate_t*>(s));
|
||||
}
|
||||
if (type == WT_BUTTON_DELEGATE) {
|
||||
return CefButtonDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_button_delegate_t*>(s));
|
||||
}
|
||||
if (type == WT_MENU_BUTTON_DELEGATE) {
|
||||
return CefMenuButtonDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_menu_button_delegate_t*>(s));
|
||||
}
|
||||
if (type == WT_PANEL_DELEGATE) {
|
||||
return CefPanelDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_panel_delegate_t*>(s));
|
||||
}
|
||||
if (type == WT_TEXTFIELD_DELEGATE) {
|
||||
return CefTextfieldDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_textfield_delegate_t*>(s));
|
||||
}
|
||||
if (type == WT_WINDOW_DELEGATE) {
|
||||
return CefWindowDelegateCppToC::Unwrap(
|
||||
reinterpret_cast<cef_window_delegate_t*>(s));
|
||||
}
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefViewDelegateCppToC,
|
||||
CefViewDelegate, cef_view_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefViewDelegateCppToC, CefViewDelegate,
|
||||
cef_view_delegate_t>::kWrapperType = WT_VIEW_DELEGATE;
|
37
libcef_dll/cpptoc/views/view_delegate_cpptoc.h
Normal file
37
libcef_dll/cpptoc/views/view_delegate_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_view_delegate.h"
|
||||
#include "include/capi/views/cef_view_delegate_capi.h"
|
||||
#include "include/views/cef_view.h"
|
||||
#include "include/capi/views/cef_view_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefViewDelegateCppToC
|
||||
: public CefCppToC<CefViewDelegateCppToC, CefViewDelegate,
|
||||
cef_view_delegate_t> {
|
||||
public:
|
||||
CefViewDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_VIEW_DELEGATE_CPPTOC_H_
|
1631
libcef_dll/cpptoc/views/window_cpptoc.cc
Normal file
1631
libcef_dll/cpptoc/views/window_cpptoc.cc
Normal file
File diff suppressed because it is too large
Load Diff
34
libcef_dll/cpptoc/views/window_cpptoc.h
Normal file
34
libcef_dll/cpptoc/views/window_cpptoc.h
Normal file
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef BUILDING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed DLL-side only")
|
||||
#else // BUILDING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_window.h"
|
||||
#include "include/capi/views/cef_window_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed DLL-side only.
|
||||
class CefWindowCppToC
|
||||
: public CefCppToC<CefWindowCppToC, CefWindow, cef_window_t> {
|
||||
public:
|
||||
CefWindowCppToC();
|
||||
};
|
||||
|
||||
#endif // BUILDING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_CPPTOC_H_
|
329
libcef_dll/cpptoc/views/window_delegate_cpptoc.cc
Normal file
329
libcef_dll/cpptoc/views/window_delegate_cpptoc.cc
Normal file
@@ -0,0 +1,329 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
void CEF_CALLBACK window_delegate_on_window_created(
|
||||
struct _cef_window_delegate_t* self, cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefWindowDelegateCppToC::Get(self)->OnWindowCreated(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK window_delegate_on_window_destroyed(
|
||||
struct _cef_window_delegate_t* self, cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefWindowDelegateCppToC::Get(self)->OnWindowDestroyed(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_delegate_is_frameless(
|
||||
struct _cef_window_delegate_t* self, cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefWindowDelegateCppToC::Get(self)->IsFrameless(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_delegate_can_resize(struct _cef_window_delegate_t* self,
|
||||
cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefWindowDelegateCppToC::Get(self)->CanResize(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_delegate_can_maximize(
|
||||
struct _cef_window_delegate_t* self, cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefWindowDelegateCppToC::Get(self)->CanMaximize(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_delegate_can_minimize(
|
||||
struct _cef_window_delegate_t* self, cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefWindowDelegateCppToC::Get(self)->CanMinimize(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_delegate_can_close(struct _cef_window_delegate_t* self,
|
||||
cef_window_t* window) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: window; type: refptr_diff
|
||||
DCHECK(window);
|
||||
if (!window)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
bool _retval = CefWindowDelegateCppToC::Get(self)->CanClose(
|
||||
CefWindowCToCpp::Wrap(window));
|
||||
|
||||
// Return type: bool
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK window_delegate_get_preferred_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefWindowDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_window_delegate_t*>(self))->GetPreferredSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK window_delegate_get_minimum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefWindowDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_window_delegate_t*>(self))->GetMinimumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
cef_size_t CEF_CALLBACK window_delegate_get_maximum_size(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return CefSize();
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return CefSize();
|
||||
|
||||
// Execute
|
||||
cef_size_t _retval = CefWindowDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_window_delegate_t*>(self))->GetMaximumSize(
|
||||
CefViewCToCpp::Wrap(view));
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_delegate_get_height_for_width(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int width) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefWindowDelegateCppToC::Get(
|
||||
reinterpret_cast<cef_window_delegate_t*>(self))->GetHeightForWidth(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
width);
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK window_delegate_on_parent_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* parent) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: parent; type: refptr_diff
|
||||
DCHECK(parent);
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefWindowDelegateCppToC::Get(reinterpret_cast<cef_window_delegate_t*>(
|
||||
self))->OnParentViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(parent));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK window_delegate_on_child_view_changed(
|
||||
struct _cef_view_delegate_t* self, cef_view_t* view, int added,
|
||||
cef_view_t* child) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Verify param: view; type: refptr_diff
|
||||
DCHECK(view);
|
||||
if (!view)
|
||||
return;
|
||||
// Verify param: child; type: refptr_diff
|
||||
DCHECK(child);
|
||||
if (!child)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefWindowDelegateCppToC::Get(reinterpret_cast<cef_window_delegate_t*>(
|
||||
self))->OnChildViewChanged(
|
||||
CefViewCToCpp::Wrap(view),
|
||||
added?true:false,
|
||||
CefViewCToCpp::Wrap(child));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefWindowDelegateCppToC::CefWindowDelegateCppToC() {
|
||||
GetStruct()->on_window_created = window_delegate_on_window_created;
|
||||
GetStruct()->on_window_destroyed = window_delegate_on_window_destroyed;
|
||||
GetStruct()->is_frameless = window_delegate_is_frameless;
|
||||
GetStruct()->can_resize = window_delegate_can_resize;
|
||||
GetStruct()->can_maximize = window_delegate_can_maximize;
|
||||
GetStruct()->can_minimize = window_delegate_can_minimize;
|
||||
GetStruct()->can_close = window_delegate_can_close;
|
||||
GetStruct()->base.base.get_preferred_size =
|
||||
window_delegate_get_preferred_size;
|
||||
GetStruct()->base.base.get_minimum_size = window_delegate_get_minimum_size;
|
||||
GetStruct()->base.base.get_maximum_size = window_delegate_get_maximum_size;
|
||||
GetStruct()->base.base.get_height_for_width =
|
||||
window_delegate_get_height_for_width;
|
||||
GetStruct()->base.base.on_parent_view_changed =
|
||||
window_delegate_on_parent_view_changed;
|
||||
GetStruct()->base.base.on_child_view_changed =
|
||||
window_delegate_on_child_view_changed;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefWindowDelegate> CefCppToC<CefWindowDelegateCppToC,
|
||||
CefWindowDelegate, cef_window_delegate_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_window_delegate_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefWindowDelegateCppToC,
|
||||
CefWindowDelegate, cef_window_delegate_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefWindowDelegateCppToC, CefWindowDelegate,
|
||||
cef_window_delegate_t>::kWrapperType = WT_WINDOW_DELEGATE;
|
37
libcef_dll/cpptoc/views/window_delegate_cpptoc.h
Normal file
37
libcef_dll/cpptoc/views/window_delegate_cpptoc.h
Normal file
@@ -0,0 +1,37 @@
|
||||
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_DELEGATE_CPPTOC_H_
|
||||
#define CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_DELEGATE_CPPTOC_H_
|
||||
#pragma once
|
||||
|
||||
#ifndef USING_CEF_SHARED
|
||||
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
|
||||
#else // USING_CEF_SHARED
|
||||
|
||||
#include "include/views/cef_window_delegate.h"
|
||||
#include "include/capi/views/cef_window_delegate_capi.h"
|
||||
#include "include/views/cef_window.h"
|
||||
#include "include/capi/views/cef_window_capi.h"
|
||||
#include "libcef_dll/cpptoc/cpptoc.h"
|
||||
|
||||
// Wrap a C++ class with a C structure.
|
||||
// This class may be instantiated and accessed wrapper-side only.
|
||||
class CefWindowDelegateCppToC
|
||||
: public CefCppToC<CefWindowDelegateCppToC, CefWindowDelegate,
|
||||
cef_window_delegate_t> {
|
||||
public:
|
||||
CefWindowDelegateCppToC();
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
#endif // CEF_LIBCEF_DLL_CPPTOC_VIEWS_WINDOW_DELEGATE_CPPTOC_H_
|
Reference in New Issue
Block a user