mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:57:45 +00:00
LibWeb: Plumb wheel events from widget layer to EventHandler
This commit is contained in:
parent
53081226e9
commit
ded8c728d2
11 changed files with 32 additions and 0 deletions
|
@ -73,6 +73,11 @@ Layout::InitialContainingBlockBox* EventHandler::layout_root()
|
|||
return m_frame.document()->layout_node();
|
||||
}
|
||||
|
||||
bool EventHandler::handle_mousewheel(const Gfx::IntPoint& position, unsigned int buttons, unsigned int modifiers, int wheel_delta)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EventHandler::handle_mouseup(const Gfx::IntPoint& position, unsigned button, unsigned modifiers)
|
||||
{
|
||||
if (!layout_root())
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
|
||||
bool handle_mousewheel(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers, int wheel_delta);
|
||||
|
||||
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
|
||||
|
||||
|
|
|
@ -72,6 +72,11 @@ Gfx::Palette Page::palette() const
|
|||
return m_client.palette();
|
||||
}
|
||||
|
||||
bool Page::handle_mousewheel(const Gfx::IntPoint& position, unsigned button, unsigned modifiers, int wheel_delta)
|
||||
{
|
||||
return main_frame().event_handler().handle_mousewheel(position, button, modifiers, wheel_delta);
|
||||
}
|
||||
|
||||
bool Page::handle_mouseup(const Gfx::IntPoint& position, unsigned button, unsigned modifiers)
|
||||
{
|
||||
return main_frame().event_handler().handle_mouseup(position, button, modifiers);
|
||||
|
|
|
@ -69,6 +69,7 @@ public:
|
|||
bool handle_mouseup(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
bool handle_mousedown(const Gfx::IntPoint&, unsigned button, unsigned modifiers);
|
||||
bool handle_mousemove(const Gfx::IntPoint&, unsigned buttons, unsigned modifiers);
|
||||
bool handle_mousewheel(const Gfx::IntPoint&, unsigned button, unsigned modifiers, int wheel_delta);
|
||||
|
||||
bool handle_keydown(KeyCode, unsigned modifiers, u32 code_point);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue