mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
LibGfx: Move StandardCursor enum to LibGfx
This enum existed both in LibGUI and WindowServer which was silly and error-prone.
This commit is contained in:
parent
c063a02979
commit
0f9be82826
23 changed files with 127 additions and 111 deletions
|
@ -150,7 +150,7 @@ void InProcessWebView::page_did_change_selection()
|
|||
update();
|
||||
}
|
||||
|
||||
void InProcessWebView::page_did_request_cursor_change(GUI::StandardCursor cursor)
|
||||
void InProcessWebView::page_did_request_cursor_change(Gfx::StandardCursor cursor)
|
||||
{
|
||||
if (window())
|
||||
window()->set_override_cursor(cursor);
|
||||
|
@ -358,7 +358,7 @@ void InProcessWebView::load_html(const StringView& html, const URL& url)
|
|||
bool InProcessWebView::load(const URL& url)
|
||||
{
|
||||
if (window())
|
||||
window()->set_override_cursor(GUI::StandardCursor::None);
|
||||
window()->set_override_cursor(Gfx::StandardCursor::None);
|
||||
|
||||
return page().main_frame().loader().load(url, FrameLoader::Type::Navigation);
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ LayoutDocument* InProcessWebView::layout_root()
|
|||
void InProcessWebView::page_did_request_scroll_into_view(const Gfx::IntRect& rect)
|
||||
{
|
||||
scroll_into_view(rect, true, true);
|
||||
window()->set_override_cursor(GUI::StandardCursor::None);
|
||||
window()->set_override_cursor(Gfx::StandardCursor::None);
|
||||
}
|
||||
|
||||
void InProcessWebView::load_empty_document()
|
||||
|
|
|
@ -91,7 +91,7 @@ private:
|
|||
virtual void page_did_set_document_in_main_frame(DOM::Document*) override;
|
||||
virtual void page_did_start_loading(const URL&) override;
|
||||
virtual void page_did_change_selection() override;
|
||||
virtual void page_did_request_cursor_change(GUI::StandardCursor) override;
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) override;
|
||||
virtual void page_did_request_context_menu(const Gfx::IntPoint&) override;
|
||||
virtual void page_did_request_link_context_menu(const Gfx::IntPoint&, const URL&, const String& target, unsigned modifiers) override;
|
||||
virtual void page_did_click_link(const URL&, const String& target, unsigned modifiers) override;
|
||||
|
|
|
@ -138,7 +138,7 @@ void OutOfProcessWebView::notify_server_did_request_scroll_into_view(Badge<WebCo
|
|||
void OutOfProcessWebView::notify_server_did_hover_link(Badge<WebContentClient>, const URL& url)
|
||||
{
|
||||
if (window())
|
||||
window()->set_override_cursor(GUI::StandardCursor::Hand);
|
||||
window()->set_override_cursor(Gfx::StandardCursor::Hand);
|
||||
if (on_link_hover)
|
||||
on_link_hover(url);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ void OutOfProcessWebView::notify_server_did_hover_link(Badge<WebContentClient>,
|
|||
void OutOfProcessWebView::notify_server_did_unhover_link(Badge<WebContentClient>)
|
||||
{
|
||||
if (window())
|
||||
window()->set_override_cursor(GUI::StandardCursor::None);
|
||||
window()->set_override_cursor(Gfx::StandardCursor::None);
|
||||
if (on_link_hover)
|
||||
on_link_hover({});
|
||||
}
|
||||
|
|
|
@ -216,11 +216,11 @@ bool EventHandler::handle_mousemove(const Gfx::IntPoint& position, unsigned butt
|
|||
}
|
||||
|
||||
if (is_hovering_link)
|
||||
page_client.page_did_request_cursor_change(GUI::StandardCursor::Hand);
|
||||
page_client.page_did_request_cursor_change(Gfx::StandardCursor::Hand);
|
||||
else if (is_hovering_text)
|
||||
page_client.page_did_request_cursor_change(GUI::StandardCursor::IBeam);
|
||||
page_client.page_did_request_cursor_change(Gfx::StandardCursor::IBeam);
|
||||
else
|
||||
page_client.page_did_request_cursor_change(GUI::StandardCursor::None);
|
||||
page_client.page_did_request_cursor_change(Gfx::StandardCursor::None);
|
||||
|
||||
if (hovered_node_changed) {
|
||||
RefPtr<HTML::HTMLElement> hovered_html_element = document.hovered_node() ? document.hovered_node()->enclosing_html_element() : nullptr;
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
virtual void page_did_change_title(const String&) { }
|
||||
virtual void page_did_start_loading(const URL&) { }
|
||||
virtual void page_did_change_selection() { }
|
||||
virtual void page_did_request_cursor_change(GUI::StandardCursor) { }
|
||||
virtual void page_did_request_cursor_change(Gfx::StandardCursor) { }
|
||||
virtual void page_did_request_context_menu(const Gfx::IntPoint&) { }
|
||||
virtual void page_did_request_link_context_menu(const Gfx::IntPoint&, const URL&, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
virtual void page_did_click_link(const URL&, [[maybe_unused]] const String& target, [[maybe_unused]] unsigned modifiers) { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue