Pass cursor type and custom cursor information to CefRenderHandler::OnCursorChange (issue #1443).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1928 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-11-24 21:56:12 +00:00
parent 8eb14dd71f
commit 93c1a7fcd7
17 changed files with 169 additions and 37 deletions

View File

@@ -249,7 +249,8 @@ void CEF_CALLBACK render_handler_on_paint(struct _cef_render_handler_t* self,
void CEF_CALLBACK render_handler_on_cursor_change(
struct _cef_render_handler_t* self, cef_browser_t* browser,
cef_cursor_handle_t cursor) {
cef_cursor_handle_t cursor, cef_cursor_type_t type,
const struct _cef_cursor_info_t* custom_cursor_info) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@@ -259,11 +260,22 @@ void CEF_CALLBACK render_handler_on_cursor_change(
DCHECK(browser);
if (!browser)
return;
// Verify param: custom_cursor_info; type: struct_byref_const
DCHECK(custom_cursor_info);
if (!custom_cursor_info)
return;
// Translate param: custom_cursor_info; type: struct_byref_const
CefCursorInfo custom_cursor_infoObj;
if (custom_cursor_info)
custom_cursor_infoObj.Set(*custom_cursor_info, false);
// Execute
CefRenderHandlerCppToC::Get(self)->OnCursorChange(
CefBrowserCToCpp::Wrap(browser),
cursor);
cursor,
type,
custom_cursor_infoObj);
}
int CEF_CALLBACK render_handler_start_dragging(

View File

@@ -186,7 +186,8 @@ void CefRenderHandlerCToCpp::OnPaint(CefRefPtr<CefBrowser> browser,
}
void CefRenderHandlerCToCpp::OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor) {
CefCursorHandle cursor, CursorType type,
const CefCursorInfo& custom_cursor_info) {
if (CEF_MEMBER_MISSING(struct_, on_cursor_change))
return;
@@ -200,7 +201,9 @@ void CefRenderHandlerCToCpp::OnCursorChange(CefRefPtr<CefBrowser> browser,
// Execute
struct_->on_cursor_change(struct_,
CefBrowserCppToC::Wrap(browser),
cursor);
cursor,
type,
&custom_cursor_info);
}
bool CefRenderHandlerCToCpp::StartDragging(CefRefPtr<CefBrowser> browser,

View File

@@ -44,8 +44,8 @@ class CefRenderHandlerCToCpp
void OnPaint(CefRefPtr<CefBrowser> browser, PaintElementType type,
const RectList& dirtyRects, const void* buffer, int width,
int height) override;
void OnCursorChange(CefRefPtr<CefBrowser> browser,
CefCursorHandle cursor) override;
void OnCursorChange(CefRefPtr<CefBrowser> browser, CefCursorHandle cursor,
CursorType type, const CefCursorInfo& custom_cursor_info) override;
bool StartDragging(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefDragData> drag_data, DragOperationsMask allowed_ops, int x,
int y) override;