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:
@@ -148,6 +148,18 @@ typedef struct _cef_view_t {
|
||||
///
|
||||
void (CEF_CALLBACK *set_id)(struct _cef_view_t* self, int id);
|
||||
|
||||
///
|
||||
// Returns the group id of this View, or -1 if not set.
|
||||
///
|
||||
int (CEF_CALLBACK *get_group_id)(struct _cef_view_t* self);
|
||||
|
||||
///
|
||||
// A group id is used to tag Views which are part of the same logical group.
|
||||
// Focus can be moved between views with the same group using the arrow keys.
|
||||
// The group id is immutable once it's set.
|
||||
///
|
||||
void (CEF_CALLBACK *set_group_id)(struct _cef_view_t* self, int group_id);
|
||||
|
||||
///
|
||||
// Returns the View that contains this View, if any.
|
||||
///
|
||||
|
@@ -105,6 +105,18 @@ typedef struct _cef_view_delegate_t {
|
||||
///
|
||||
void (CEF_CALLBACK *on_child_view_changed)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view, int added, struct _cef_view_t* child);
|
||||
|
||||
///
|
||||
// Called when |view| gains focus.
|
||||
///
|
||||
void (CEF_CALLBACK *on_focus)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view);
|
||||
|
||||
///
|
||||
// Called when |view| loses focus.
|
||||
///
|
||||
void (CEF_CALLBACK *on_blur)(struct _cef_view_delegate_t* self,
|
||||
struct _cef_view_t* view);
|
||||
} cef_view_delegate_t;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user