1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

LibWeb: Add a PageClient callback for image context menu requests

When the user right-clicks on an image, you might want to show a
special context menu, separate from the regular link context menu.

This patch only implements enough of the functionality to get this
working in a single-process context.
This commit is contained in:
Andreas Kling 2020-10-02 19:01:51 +02:00
parent d00bfd0eaa
commit 91b49dd9d0
5 changed files with 22 additions and 0 deletions

View file

@ -37,6 +37,7 @@ public:
Function<void(const Gfx::IntPoint& screen_position)> on_context_menu_request;
Function<void(const URL&, const String& target, unsigned modifiers)> on_link_click;
Function<void(const URL&, const Gfx::IntPoint& screen_position)> on_link_context_menu_request;
Function<void(const URL&, const Gfx::IntPoint& screen_position, const Gfx::ShareableBitmap&)> on_image_context_menu_request;
Function<void(const URL&, const String& target, unsigned modifiers)> on_link_middle_click;
Function<void(const URL&)> on_link_hover;
Function<void(const String&)> on_title_change;