2022-01-06 19:34:35 +01:00
|
|
|
// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
|
2014-07-01 00:30:29 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2022-05-27 11:03:31 +02:00
|
|
|
// $hash=6671ca3d639065c49adfc8ceac4c58833344d558$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/render_handler_cpptoc.h"
|
2017-05-19 11:06:00 +02:00
|
|
|
#include "libcef_dll/cpptoc/accessibility_handler_cpptoc.h"
|
2014-07-01 00:30:29 +02:00
|
|
|
#include "libcef_dll/ctocpp/browser_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/drag_data_ctocpp.h"
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2022-01-27 18:10:29 +01:00
|
|
|
#include "libcef_dll/template_util.h"
|
2014-07-01 00:30:29 +02:00
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
namespace {
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_accessibility_handler_t* CEF_CALLBACK
|
|
|
|
render_handler_get_accessibility_handler(struct _cef_render_handler_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2017-05-12 20:28:25 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefAccessibilityHandler> _retval =
|
|
|
|
CefRenderHandlerCppToC::Get(self)->GetAccessibilityHandler();
|
2017-05-12 20:28:25 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefAccessibilityHandlerCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
render_handler_get_root_screen_rect(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_rect_t* rect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// 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;
|
|
|
|
// Verify param: rect; type: simple_byref
|
|
|
|
DCHECK(rect);
|
|
|
|
if (!rect)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Translate param: rect; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRect rectVal = rect ? *rect : CefRect();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRenderHandlerCppToC::Get(self)->GetRootScreenRect(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), rectVal);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Restore param: rect; type: simple_byref
|
|
|
|
if (rect)
|
|
|
|
*rect = rectVal;
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2018-09-25 15:40:02 +02:00
|
|
|
void CEF_CALLBACK
|
2017-05-17 11:29:28 +02:00
|
|
|
render_handler_get_view_rect(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_rect_t* rect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
2018-09-25 15:40:02 +02:00
|
|
|
return;
|
2014-07-01 00:30:29 +02:00
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
2018-09-25 15:40:02 +02:00
|
|
|
return;
|
2014-07-01 00:30:29 +02:00
|
|
|
// Verify param: rect; type: simple_byref
|
|
|
|
DCHECK(rect);
|
|
|
|
if (!rect)
|
2018-09-25 15:40:02 +02:00
|
|
|
return;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Translate param: rect; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRect rectVal = rect ? *rect : CefRect();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
2018-09-25 15:40:02 +02:00
|
|
|
CefRenderHandlerCppToC::Get(self)->GetViewRect(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), rectVal);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Restore param: rect; type: simple_byref
|
|
|
|
if (rect)
|
|
|
|
*rect = rectVal;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
render_handler_get_screen_point(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
int viewX,
|
|
|
|
int viewY,
|
|
|
|
int* screenX,
|
|
|
|
int* screenY) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// 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;
|
|
|
|
// Verify param: screenX; type: simple_byref
|
|
|
|
DCHECK(screenX);
|
|
|
|
if (!screenX)
|
|
|
|
return 0;
|
|
|
|
// Verify param: screenY; type: simple_byref
|
|
|
|
DCHECK(screenY);
|
|
|
|
if (!screenY)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Translate param: screenX; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
int screenXVal = screenX ? *screenX : 0;
|
2014-07-01 00:30:29 +02:00
|
|
|
// Translate param: screenY; type: simple_byref
|
2017-05-17 11:29:28 +02:00
|
|
|
int screenYVal = screenY ? *screenY : 0;
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenPoint(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), viewX, viewY, screenXVal, screenYVal);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Restore param: screenX; type: simple_byref
|
|
|
|
if (screenX)
|
|
|
|
*screenX = screenXVal;
|
|
|
|
// Restore param: screenY; type: simple_byref
|
|
|
|
if (screenY)
|
|
|
|
*screenY = screenYVal;
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
render_handler_get_screen_info(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
struct _cef_screen_info_t* screen_info) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// 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;
|
|
|
|
// Verify param: screen_info; type: struct_byref
|
|
|
|
DCHECK(screen_info);
|
|
|
|
if (!screen_info)
|
|
|
|
return 0;
|
2022-01-27 18:10:29 +01:00
|
|
|
if (!template_util::has_valid_size(screen_info)) {
|
|
|
|
NOTREACHED() << "invalid screen_info->[base.]size";
|
|
|
|
return 0;
|
|
|
|
}
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Translate param: screen_info; type: struct_byref
|
|
|
|
CefScreenInfo screen_infoObj;
|
|
|
|
if (screen_info)
|
|
|
|
screen_infoObj.AttachTo(*screen_info);
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRenderHandlerCppToC::Get(self)->GetScreenInfo(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), screen_infoObj);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Restore param: screen_info; type: struct_byref
|
|
|
|
if (screen_info)
|
|
|
|
screen_infoObj.DetachTo(*screen_info);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_on_popup_show(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
int show) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnPopupShow(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), show ? true : false);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_on_popup_size(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_rect_t* rect) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: rect; type: simple_byref_const
|
|
|
|
DCHECK(rect);
|
|
|
|
if (!rect)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: rect; type: simple_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRect rectVal = rect ? *rect : CefRect();
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnPopupSize(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), rectVal);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_paint_element_type_t type,
|
|
|
|
size_t dirtyRectsCount,
|
|
|
|
cef_rect_t const* dirtyRects,
|
|
|
|
const void* buffer,
|
|
|
|
int width,
|
|
|
|
int height) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: dirtyRects; type: simple_vec_byref_const
|
|
|
|
DCHECK(dirtyRectsCount == 0 || dirtyRects);
|
|
|
|
if (dirtyRectsCount > 0 && !dirtyRects)
|
|
|
|
return;
|
|
|
|
// Verify param: buffer; type: simple_byaddr
|
|
|
|
DCHECK(buffer);
|
|
|
|
if (!buffer)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: dirtyRects; type: simple_vec_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
std::vector<CefRect> dirtyRectsList;
|
2014-07-01 00:30:29 +02:00
|
|
|
if (dirtyRectsCount > 0) {
|
|
|
|
for (size_t i = 0; i < dirtyRectsCount; ++i) {
|
2015-06-06 00:06:48 +02:00
|
|
|
CefRect dirtyRectsVal = dirtyRects[i];
|
|
|
|
dirtyRectsList.push_back(dirtyRectsVal);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRenderHandlerCppToC::Get(self)->OnPaint(CefBrowserCToCpp::Wrap(browser),
|
|
|
|
type, dirtyRectsList, buffer,
|
|
|
|
width, height);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2018-07-03 02:46:03 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_on_accelerated_paint(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_paint_element_type_t type,
|
|
|
|
size_t dirtyRectsCount,
|
|
|
|
cef_rect_t const* dirtyRects,
|
|
|
|
void* shared_handle) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2018-07-03 02:46:03 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: dirtyRects; type: simple_vec_byref_const
|
|
|
|
DCHECK(dirtyRectsCount == 0 || dirtyRects);
|
|
|
|
if (dirtyRectsCount > 0 && !dirtyRects)
|
|
|
|
return;
|
|
|
|
// Verify param: shared_handle; type: simple_byaddr
|
|
|
|
DCHECK(shared_handle);
|
|
|
|
if (!shared_handle)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: dirtyRects; type: simple_vec_byref_const
|
|
|
|
std::vector<CefRect> dirtyRectsList;
|
|
|
|
if (dirtyRectsCount > 0) {
|
|
|
|
for (size_t i = 0; i < dirtyRectsCount; ++i) {
|
|
|
|
CefRect dirtyRectsVal = dirtyRects[i];
|
|
|
|
dirtyRectsList.push_back(dirtyRectsVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnAcceleratedPaint(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), type, dirtyRectsList, shared_handle);
|
|
|
|
}
|
|
|
|
|
2022-05-27 11:03:31 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_get_touch_handle_size(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_horizontal_alignment_t orientation,
|
|
|
|
cef_size_t* size) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: size; type: simple_byref
|
|
|
|
DCHECK(size);
|
|
|
|
if (!size)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: size; type: simple_byref
|
|
|
|
CefSize sizeVal = size ? *size : CefSize();
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->GetTouchHandleSize(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), orientation, sizeVal);
|
|
|
|
|
|
|
|
// Restore param: size; type: simple_byref
|
|
|
|
if (size)
|
|
|
|
*size = sizeVal;
|
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK render_handler_on_touch_handle_state_changed(
|
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const struct _cef_touch_handle_state_t* state) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: state; type: struct_byref_const
|
|
|
|
DCHECK(state);
|
|
|
|
if (!state)
|
|
|
|
return;
|
|
|
|
if (!template_util::has_valid_size(state)) {
|
|
|
|
NOTREACHED() << "invalid state->[base.]size";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Translate param: state; type: struct_byref_const
|
|
|
|
CefTouchHandleState stateObj;
|
|
|
|
if (state)
|
|
|
|
stateObj.Set(*state, false);
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnTouchHandleStateChanged(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), stateObj);
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
int CEF_CALLBACK
|
|
|
|
render_handler_start_dragging(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_drag_data_t* drag_data,
|
|
|
|
cef_drag_operations_mask_t allowed_ops,
|
|
|
|
int x,
|
|
|
|
int y) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// 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;
|
|
|
|
// Verify param: drag_data; type: refptr_diff
|
|
|
|
DCHECK(drag_data);
|
|
|
|
if (!drag_data)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefRenderHandlerCppToC::Get(self)->StartDragging(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), CefDragDataCToCpp::Wrap(drag_data),
|
|
|
|
allowed_ops, x, y);
|
2014-07-01 00:30:29 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_update_drag_cursor(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_drag_operations_mask_t operation) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->UpdateDragCursor(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), operation);
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_on_scroll_offset_changed(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
double x,
|
|
|
|
double y) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2014-10-07 22:44:33 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnScrollOffsetChanged(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), x, y);
|
2014-10-07 22:44:33 +02:00
|
|
|
}
|
|
|
|
|
2016-10-28 18:11:24 +02:00
|
|
|
void CEF_CALLBACK render_handler_on_ime_composition_range_changed(
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_range_t* selected_range,
|
|
|
|
size_t character_boundsCount,
|
2016-10-28 18:11:24 +02:00
|
|
|
cef_rect_t const* character_bounds) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2016-10-28 18:11:24 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Verify param: selected_range; type: simple_byref_const
|
|
|
|
DCHECK(selected_range);
|
|
|
|
if (!selected_range)
|
|
|
|
return;
|
|
|
|
// Verify param: character_bounds; type: simple_vec_byref_const
|
|
|
|
DCHECK(character_boundsCount == 0 || character_bounds);
|
|
|
|
if (character_boundsCount > 0 && !character_bounds)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: selected_range; type: simple_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRange selected_rangeVal = selected_range ? *selected_range : CefRange();
|
2016-10-28 18:11:24 +02:00
|
|
|
// Translate param: character_bounds; type: simple_vec_byref_const
|
2017-05-17 11:29:28 +02:00
|
|
|
std::vector<CefRect> character_boundsList;
|
2016-10-28 18:11:24 +02:00
|
|
|
if (character_boundsCount > 0) {
|
|
|
|
for (size_t i = 0; i < character_boundsCount; ++i) {
|
|
|
|
CefRect character_boundsVal = character_bounds[i];
|
|
|
|
character_boundsList.push_back(character_boundsVal);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnImeCompositionRangeChanged(
|
2017-05-17 11:29:28 +02:00
|
|
|
CefBrowserCToCpp::Wrap(browser), selected_rangeVal, character_boundsList);
|
2016-10-28 18:11:24 +02:00
|
|
|
}
|
|
|
|
|
2018-04-09 19:48:23 +02:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_on_text_selection_changed(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
const cef_string_t* selected_text,
|
|
|
|
const cef_range_t* selected_range) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2018-04-09 19:48:23 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
// Unverified params: selected_text, selected_range
|
|
|
|
|
|
|
|
// Translate param: selected_range; type: simple_byref_const
|
|
|
|
CefRange selected_rangeVal = selected_range ? *selected_range : CefRange();
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnTextSelectionChanged(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), CefString(selected_text),
|
|
|
|
selected_rangeVal);
|
|
|
|
}
|
|
|
|
|
2019-02-26 17:49:41 +01:00
|
|
|
void CEF_CALLBACK
|
|
|
|
render_handler_on_virtual_keyboard_requested(struct _cef_render_handler_t* self,
|
|
|
|
cef_browser_t* browser,
|
|
|
|
cef_text_input_mode_t input_mode) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: browser; type: refptr_diff
|
|
|
|
DCHECK(browser);
|
|
|
|
if (!browser)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRenderHandlerCppToC::Get(self)->OnVirtualKeyboardRequested(
|
|
|
|
CefBrowserCToCpp::Wrap(browser), input_mode);
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
} // namespace
|
|
|
|
|
2014-07-01 00:30:29 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
CefRenderHandlerCppToC::CefRenderHandlerCppToC() {
|
2017-05-12 20:28:25 +02:00
|
|
|
GetStruct()->get_accessibility_handler =
|
|
|
|
render_handler_get_accessibility_handler;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->get_root_screen_rect = render_handler_get_root_screen_rect;
|
|
|
|
GetStruct()->get_view_rect = render_handler_get_view_rect;
|
|
|
|
GetStruct()->get_screen_point = render_handler_get_screen_point;
|
|
|
|
GetStruct()->get_screen_info = render_handler_get_screen_info;
|
|
|
|
GetStruct()->on_popup_show = render_handler_on_popup_show;
|
|
|
|
GetStruct()->on_popup_size = render_handler_on_popup_size;
|
|
|
|
GetStruct()->on_paint = render_handler_on_paint;
|
2018-07-03 02:46:03 +02:00
|
|
|
GetStruct()->on_accelerated_paint = render_handler_on_accelerated_paint;
|
2022-05-27 11:03:31 +02:00
|
|
|
GetStruct()->get_touch_handle_size = render_handler_get_touch_handle_size;
|
|
|
|
GetStruct()->on_touch_handle_state_changed =
|
|
|
|
render_handler_on_touch_handle_state_changed;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->start_dragging = render_handler_start_dragging;
|
|
|
|
GetStruct()->update_drag_cursor = render_handler_update_drag_cursor;
|
|
|
|
GetStruct()->on_scroll_offset_changed =
|
2014-10-07 22:44:33 +02:00
|
|
|
render_handler_on_scroll_offset_changed;
|
2016-10-28 18:11:24 +02:00
|
|
|
GetStruct()->on_ime_composition_range_changed =
|
|
|
|
render_handler_on_ime_composition_range_changed;
|
2018-04-09 19:48:23 +02:00
|
|
|
GetStruct()->on_text_selection_changed =
|
|
|
|
render_handler_on_text_selection_changed;
|
2019-02-26 17:49:41 +01:00
|
|
|
GetStruct()->on_virtual_keyboard_requested =
|
|
|
|
render_handler_on_virtual_keyboard_requested;
|
2014-07-01 00:30:29 +02:00
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefRenderHandlerCppToC::~CefRenderHandlerCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefRenderHandler> CefCppToCRefCounted<
|
|
|
|
CefRenderHandlerCppToC,
|
|
|
|
CefRenderHandler,
|
|
|
|
cef_render_handler_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
cef_render_handler_t* s) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2015-04-26 20:40:01 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefRenderHandlerCppToC,
|
|
|
|
CefRenderHandler,
|
|
|
|
cef_render_handler_t>::kWrapperType =
|
|
|
|
WT_RENDER_HANDLER;
|