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:
@ -231,6 +231,32 @@ void CEF_CALLBACK view_set_id(struct _cef_view_t* self, int id) {
|
||||
id);
|
||||
}
|
||||
|
||||
int CEF_CALLBACK view_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 = CefViewCppToC::Get(self)->GetGroupID();
|
||||
|
||||
// Return type: simple
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK view_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
|
||||
CefViewCppToC::Get(self)->SetGroupID(
|
||||
group_id);
|
||||
}
|
||||
|
||||
struct _cef_view_t* CEF_CALLBACK view_get_parent_view(
|
||||
struct _cef_view_t* self) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -794,6 +820,8 @@ CefViewCppToC::CefViewCppToC() {
|
||||
GetStruct()->get_window = view_get_window;
|
||||
GetStruct()->get_id = view_get_id;
|
||||
GetStruct()->set_id = view_set_id;
|
||||
GetStruct()->get_group_id = view_get_group_id;
|
||||
GetStruct()->set_group_id = view_set_group_id;
|
||||
GetStruct()->get_parent_view = view_get_parent_view;
|
||||
GetStruct()->get_view_for_id = view_get_view_for_id;
|
||||
GetStruct()->set_bounds = view_set_bounds;
|
||||
|
Reference in New Issue
Block a user