mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
views: Add groups and focus/blur callbacks (issue #2102)
- cefclient: Only make menus focusable when ALT is pressed. - cefclient: Display sample top menu when passed the `--show-top-menu` command-line flag.
This commit is contained in:
@ -984,6 +984,33 @@ void CEF_CALLBACK window_set_id(struct _cef_view_t* self, int id) {
|
||||
id);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK window_get_group_id(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return 0;
|
||||
|
||||
// Execute
|
||||
int _retval = CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(
|
||||
self))->GetGroupID();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK window_set_group_id(struct _cef_view_t* self, int group_id) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
|
||||
// Execute
|
||||
CefWindowCppToC::Get(reinterpret_cast<cef_window_t*>(self))->SetGroupID(
|
||||
group_id);
|
||||
}
|
||||
|
||||
cef_view_t* CEF_CALLBACK window_get_parent_view(struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
@ -1621,6 +1648,8 @@ CefWindowCppToC::CefWindowCppToC() {
|
||||
GetStruct()->base.base.get_window = window_get_window;
|
||||
GetStruct()->base.base.get_id = window_get_id;
|
||||
GetStruct()->base.base.set_id = window_set_id;
|
||||
GetStruct()->base.base.get_group_id = window_get_group_id;
|
||||
GetStruct()->base.base.set_group_id = window_set_group_id;
|
||||
GetStruct()->base.base.get_parent_view = window_get_parent_view;
|
||||
GetStruct()->base.base.get_view_for_id = window_get_view_for_id;
|
||||
GetStruct()->base.base.set_bounds = window_set_bounds;
|
||||
|
Reference in New Issue
Block a user