mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Standardize IME callbacks for off-screen rendering (issue #1675)
This commit is contained in:
@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user