mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-28 04:45:13 +00:00
Prepare for key event delivery to a specific focus item
Begin by routing key events through the component. In the future that will direct the event to the focus item.
This commit is contained in:
parent
2b76e9277a
commit
aa5babffe1
8 changed files with 82 additions and 15 deletions
|
@ -134,6 +134,8 @@ constexpr inline ItemTreeNode make_dyn_node(std::uintptr_t offset)
|
|||
}
|
||||
|
||||
using cbindgen_private::InputEventResult;
|
||||
using cbindgen_private::KeyEvent;
|
||||
using cbindgen_private::KeyEventResult;
|
||||
using cbindgen_private::MouseEvent;
|
||||
using cbindgen_private::sixtyfps_visit_item_tree;
|
||||
namespace private_api {
|
||||
|
@ -174,6 +176,14 @@ inline InputEventResult process_input_event(ComponentRef component, int64_t &mou
|
|||
component, mouse_event, window, *app_component, &mouse_grabber);
|
||||
}
|
||||
}
|
||||
template<typename GetDynamic>
|
||||
inline KeyEventResult process_key_event(ComponentRef component, const KeyEvent *key_event,
|
||||
Slice<ItemTreeNode> tree, GetDynamic get_dynamic,
|
||||
const ComponentWindow *window)
|
||||
{
|
||||
|
||||
return cbindgen_private::sixtyfps_process_key_event(component, key_event, window);
|
||||
}
|
||||
}
|
||||
|
||||
// layouts:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue