Standardize IME callbacks for off-screen rendering (issue #1675)

This commit is contained in:
Marshall Greenblatt
2016-10-28 12:11:24 -04:00
parent e69de63b15
commit d6b17a8fb5
48 changed files with 1999 additions and 976 deletions

View File

@ -283,6 +283,45 @@ void CefRenderHandlerCToCpp::OnScrollOffsetChanged(
y);
}
void CefRenderHandlerCToCpp::OnImeCompositionRangeChanged(
CefRefPtr<CefBrowser> browser, const CefRange& selected_range,
const RectList& character_bounds) {
cef_render_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_ime_composition_range_changed))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Translate param: character_bounds; type: simple_vec_byref_const
const size_t character_boundsCount = character_bounds.size();
cef_rect_t* character_boundsList = NULL;
if (character_boundsCount > 0) {
character_boundsList = new cef_rect_t[character_boundsCount];
DCHECK(character_boundsList);
if (character_boundsList) {
for (size_t i = 0; i < character_boundsCount; ++i) {
character_boundsList[i] = character_bounds[i];
}
}
}
// Execute
_struct->on_ime_composition_range_changed(_struct,
CefBrowserCppToC::Wrap(browser),
&selected_range,
character_boundsCount,
character_boundsList);
// Restore param:character_bounds; type: simple_vec_byref_const
if (character_boundsList)
delete [] character_boundsList;
}
// CONSTRUCTOR - Do not edit by hand.