mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add CefHandler::HandleTooltip and default tooltip implementation (issue #61).
- Add Common Controls to cefclient manifest because it's required for the default tooltip implementation. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@96 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -457,6 +457,28 @@ enum cef_retval_t CEF_CALLBACK handler_handle_key_event(
|
||||
modifiers, isSystemKey?true:false);
|
||||
}
|
||||
|
||||
enum cef_retval_t CEF_CALLBACK handler_handle_tooltip(
|
||||
struct _cef_handler_t* self, struct _cef_browser_t* browser,
|
||||
cef_string_t* text)
|
||||
{
|
||||
DCHECK(self);
|
||||
DCHECK(browser);
|
||||
DCHECK(text);
|
||||
if(!self || !browser || !text)
|
||||
return RV_CONTINUE;
|
||||
|
||||
std::wstring textStr;
|
||||
if(*text)
|
||||
textStr = *text;
|
||||
|
||||
enum cef_retval_t rv = CefHandlerCppToC::Get(self)->HandleTooltip(
|
||||
CefBrowserCToCpp::Wrap(browser), textStr);
|
||||
|
||||
transfer_string_contents(textStr, text);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
enum cef_retval_t CEF_CALLBACK handler_handle_console_message(
|
||||
struct _cef_handler_t* self, cef_browser_t* browser, const wchar_t* message,
|
||||
const wchar_t* source, int line)
|
||||
@ -521,6 +543,7 @@ CefHandlerCppToC::CefHandlerCppToC(CefHandler* cls)
|
||||
struct_.struct_.handle_take_focus = handler_handle_take_focus;
|
||||
struct_.struct_.handle_set_focus = handler_handle_set_focus;
|
||||
struct_.struct_.handle_key_event = handler_handle_key_event;
|
||||
struct_.struct_.handle_tooltip = handler_handle_tooltip;
|
||||
struct_.struct_.handle_console_message = handler_handle_console_message;
|
||||
struct_.struct_.handle_find_result = handler_handle_find_result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user