mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 15:57:36 +00:00
Meta+Userland: Pass Gfx::IntPoint by value
This is just two ints or 8 bytes or the size of the reference on x86_64 or AArch64.
This commit is contained in:
parent
bbc149ebb9
commit
7be0b27dd3
161 changed files with 442 additions and 441 deletions
|
@ -155,27 +155,27 @@ void ConnectionFromClient::flush_pending_paint_requests()
|
|||
m_pending_paint_requests.clear();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::mouse_down(Gfx::IntPoint const& position, unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
void ConnectionFromClient::mouse_down(Gfx::IntPoint position, unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
{
|
||||
report_finished_handling_input_event(page().handle_mousedown(position, button, buttons, modifiers));
|
||||
}
|
||||
|
||||
void ConnectionFromClient::mouse_move(Gfx::IntPoint const& position, [[maybe_unused]] unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
void ConnectionFromClient::mouse_move(Gfx::IntPoint position, [[maybe_unused]] unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
{
|
||||
report_finished_handling_input_event(page().handle_mousemove(position, buttons, modifiers));
|
||||
}
|
||||
|
||||
void ConnectionFromClient::mouse_up(Gfx::IntPoint const& position, unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
void ConnectionFromClient::mouse_up(Gfx::IntPoint position, unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
{
|
||||
report_finished_handling_input_event(page().handle_mouseup(position, button, buttons, modifiers));
|
||||
}
|
||||
|
||||
void ConnectionFromClient::mouse_wheel(Gfx::IntPoint const& position, unsigned int button, unsigned int buttons, unsigned int modifiers, i32 wheel_delta_x, i32 wheel_delta_y)
|
||||
void ConnectionFromClient::mouse_wheel(Gfx::IntPoint position, unsigned int button, unsigned int buttons, unsigned int modifiers, i32 wheel_delta_x, i32 wheel_delta_y)
|
||||
{
|
||||
report_finished_handling_input_event(page().handle_mousewheel(position, button, buttons, modifiers, wheel_delta_x, wheel_delta_y));
|
||||
}
|
||||
|
||||
void ConnectionFromClient::doubleclick(Gfx::IntPoint const& position, unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
void ConnectionFromClient::doubleclick(Gfx::IntPoint position, unsigned int button, unsigned int buttons, unsigned int modifiers)
|
||||
{
|
||||
report_finished_handling_input_event(page().handle_doubleclick(position, button, buttons, modifiers));
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ void ConnectionFromClient::set_is_scripting_enabled(bool is_scripting_enabled)
|
|||
m_page_host->set_is_scripting_enabled(is_scripting_enabled);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_window_position(Gfx::IntPoint const& position)
|
||||
void ConnectionFromClient::set_window_position(Gfx::IntPoint position)
|
||||
{
|
||||
m_page_host->set_window_position(position);
|
||||
}
|
||||
|
|
|
@ -55,11 +55,11 @@ private:
|
|||
virtual void load_html(DeprecatedString const&, URL const&) override;
|
||||
virtual void paint(Gfx::IntRect const&, i32) override;
|
||||
virtual void set_viewport_rect(Gfx::IntRect const&) override;
|
||||
virtual void mouse_down(Gfx::IntPoint const&, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_move(Gfx::IntPoint const&, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_up(Gfx::IntPoint const&, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_wheel(Gfx::IntPoint const&, unsigned, unsigned, unsigned, i32, i32) override;
|
||||
virtual void doubleclick(Gfx::IntPoint const&, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_down(Gfx::IntPoint, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_move(Gfx::IntPoint, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_up(Gfx::IntPoint, unsigned, unsigned, unsigned) override;
|
||||
virtual void mouse_wheel(Gfx::IntPoint, unsigned, unsigned, unsigned, i32, i32) override;
|
||||
virtual void doubleclick(Gfx::IntPoint, unsigned, unsigned, unsigned) override;
|
||||
virtual void key_down(i32, unsigned, u32) override;
|
||||
virtual void key_up(i32, unsigned, u32) override;
|
||||
virtual void add_backing_store(i32, Gfx::ShareableBitmap const&) override;
|
||||
|
@ -75,7 +75,7 @@ private:
|
|||
virtual void set_preferred_color_scheme(Web::CSS::PreferredColorScheme const&) override;
|
||||
virtual void set_has_focus(bool) override;
|
||||
virtual void set_is_scripting_enabled(bool) override;
|
||||
virtual void set_window_position(Gfx::IntPoint const&) override;
|
||||
virtual void set_window_position(Gfx::IntPoint) override;
|
||||
virtual void set_window_size(Gfx::IntSize const&) override;
|
||||
virtual void handle_file_return(i32 error, Optional<IPC::File> const& file, i32 request_id) override;
|
||||
virtual void set_system_visibility_state(bool visible) override;
|
||||
|
|
|
@ -79,7 +79,7 @@ void PageHost::set_is_scripting_enabled(bool is_scripting_enabled)
|
|||
page().set_is_scripting_enabled(is_scripting_enabled);
|
||||
}
|
||||
|
||||
void PageHost::set_window_position(Gfx::IntPoint const& position)
|
||||
void PageHost::set_window_position(Gfx::IntPoint position)
|
||||
{
|
||||
page().set_window_position(position);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ Gfx::IntSize PageHost::page_did_request_resize_window(Gfx::IntSize const& size)
|
|||
return m_client.did_request_resize_window(size);
|
||||
}
|
||||
|
||||
Gfx::IntPoint PageHost::page_did_request_reposition_window(Gfx::IntPoint const& position)
|
||||
Gfx::IntPoint PageHost::page_did_request_reposition_window(Gfx::IntPoint position)
|
||||
{
|
||||
return m_client.did_request_reposition_window(position);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ void PageHost::page_did_request_scroll(i32 x_delta, i32 y_delta)
|
|||
m_client.async_did_request_scroll(x_delta, y_delta);
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_scroll_to(Gfx::IntPoint const& scroll_position)
|
||||
void PageHost::page_did_request_scroll_to(Gfx::IntPoint scroll_position)
|
||||
{
|
||||
m_client.async_did_request_scroll_to(scroll_position);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ void PageHost::page_did_request_scroll_into_view(Gfx::IntRect const& rect)
|
|||
m_client.async_did_request_scroll_into_view(rect);
|
||||
}
|
||||
|
||||
void PageHost::page_did_enter_tooltip_area(Gfx::IntPoint const& content_position, DeprecatedString const& title)
|
||||
void PageHost::page_did_enter_tooltip_area(Gfx::IntPoint content_position, DeprecatedString const& title)
|
||||
{
|
||||
m_client.async_did_enter_tooltip_area(content_position, title);
|
||||
}
|
||||
|
@ -268,12 +268,12 @@ void PageHost::page_did_finish_loading(const URL& url)
|
|||
m_client.async_did_finish_loading(url);
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_context_menu(Gfx::IntPoint const& content_position)
|
||||
void PageHost::page_did_request_context_menu(Gfx::IntPoint content_position)
|
||||
{
|
||||
m_client.async_did_request_context_menu(content_position);
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_link_context_menu(Gfx::IntPoint const& content_position, const URL& url, DeprecatedString const& target, unsigned modifiers)
|
||||
void PageHost::page_did_request_link_context_menu(Gfx::IntPoint content_position, const URL& url, DeprecatedString const& target, unsigned modifiers)
|
||||
{
|
||||
m_client.async_did_request_link_context_menu(content_position, url, target, modifiers);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void PageHost::page_did_change_favicon(Gfx::Bitmap const& favicon)
|
|||
m_client.async_did_change_favicon(favicon.to_shareable_bitmap());
|
||||
}
|
||||
|
||||
void PageHost::page_did_request_image_context_menu(Gfx::IntPoint const& content_position, const URL& url, DeprecatedString const& target, unsigned modifiers, Gfx::Bitmap const* bitmap_pointer)
|
||||
void PageHost::page_did_request_image_context_menu(Gfx::IntPoint content_position, const URL& url, DeprecatedString const& target, unsigned modifiers, Gfx::Bitmap const* bitmap_pointer)
|
||||
{
|
||||
auto bitmap = bitmap_pointer ? bitmap_pointer->to_shareable_bitmap() : Gfx::ShareableBitmap();
|
||||
m_client.async_did_request_image_context_menu(content_position, url, target, modifiers, bitmap);
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
void set_should_show_line_box_borders(bool b) { m_should_show_line_box_borders = b; }
|
||||
void set_has_focus(bool);
|
||||
void set_is_scripting_enabled(bool);
|
||||
void set_window_position(Gfx::IntPoint const&);
|
||||
void set_window_position(Gfx::IntPoint);
|
||||
void set_window_size(Gfx::IntSize const&);
|
||||
|
||||
Gfx::IntSize const& content_size() const { return m_content_size; }
|
||||
|
@ -61,22 +61,22 @@ private:
|
|||
virtual void page_did_request_navigate_forward() override;
|
||||
virtual void page_did_request_refresh() override;
|
||||
virtual Gfx::IntSize page_did_request_resize_window(Gfx::IntSize const&) override;
|
||||
virtual Gfx::IntPoint page_did_request_reposition_window(Gfx::IntPoint const&) override;
|
||||
virtual Gfx::IntPoint page_did_request_reposition_window(Gfx::IntPoint) override;
|
||||
virtual void page_did_request_restore_window() override;
|
||||
virtual Gfx::IntRect page_did_request_maximize_window() override;
|
||||
virtual Gfx::IntRect page_did_request_minimize_window() override;
|
||||
virtual Gfx::IntRect page_did_request_fullscreen_window() override;
|
||||
virtual void page_did_request_scroll(i32, i32) override;
|
||||
virtual void page_did_request_scroll_to(Gfx::IntPoint const&) override;
|
||||
virtual void page_did_request_scroll_to(Gfx::IntPoint) override;
|
||||
virtual void page_did_request_scroll_into_view(Gfx::IntRect const&) override;
|
||||
virtual void page_did_enter_tooltip_area(Gfx::IntPoint const&, DeprecatedString const&) override;
|
||||
virtual void page_did_enter_tooltip_area(Gfx::IntPoint, DeprecatedString const&) override;
|
||||
virtual void page_did_leave_tooltip_area() override;
|
||||
virtual void page_did_hover_link(const URL&) override;
|
||||
virtual void page_did_unhover_link() override;
|
||||
virtual void page_did_click_link(const URL&, DeprecatedString const& target, unsigned modifiers) override;
|
||||
virtual void page_did_middle_click_link(const URL&, DeprecatedString const& target, unsigned modifiers) override;
|
||||
virtual void page_did_request_context_menu(Gfx::IntPoint const&) override;
|
||||
virtual void page_did_request_link_context_menu(Gfx::IntPoint const&, const URL&, DeprecatedString const& target, unsigned modifiers) override;
|
||||
virtual void page_did_request_context_menu(Gfx::IntPoint) override;
|
||||
virtual void page_did_request_link_context_menu(Gfx::IntPoint, const URL&, DeprecatedString const& target, unsigned modifiers) override;
|
||||
virtual void page_did_start_loading(const URL&, bool) override;
|
||||
virtual void page_did_create_main_document() override;
|
||||
virtual void page_did_finish_loading(const URL&) override;
|
||||
|
@ -87,7 +87,7 @@ private:
|
|||
virtual void page_did_request_accept_dialog() override;
|
||||
virtual void page_did_request_dismiss_dialog() override;
|
||||
virtual void page_did_change_favicon(Gfx::Bitmap const&) override;
|
||||
virtual void page_did_request_image_context_menu(Gfx::IntPoint const&, const URL&, DeprecatedString const& target, unsigned modifiers, Gfx::Bitmap const*) override;
|
||||
virtual void page_did_request_image_context_menu(Gfx::IntPoint, const URL&, DeprecatedString const& target, unsigned modifiers, Gfx::Bitmap const*) override;
|
||||
virtual Vector<Web::Cookie::Cookie> page_did_request_all_cookies(URL const&) override;
|
||||
virtual Optional<Web::Cookie::Cookie> page_did_request_named_cookie(URL const&, DeprecatedString const&) override;
|
||||
virtual DeprecatedString page_did_request_cookie(const URL&, Web::Cookie::Source) override;
|
||||
|
|
|
@ -31,7 +31,7 @@ AppletManager& AppletManager::the()
|
|||
return *s_the;
|
||||
}
|
||||
|
||||
void AppletManager::set_position(Gfx::IntPoint const& position)
|
||||
void AppletManager::set_position(Gfx::IntPoint position)
|
||||
{
|
||||
m_window->move_to(position);
|
||||
m_window->set_visible(true);
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
void invalidate_applet(Window const& applet, Gfx::IntRect const& rect);
|
||||
void relayout();
|
||||
|
||||
void set_position(Gfx::IntPoint const&);
|
||||
void set_position(Gfx::IntPoint);
|
||||
|
||||
Window* window() { return m_window; }
|
||||
Window const* window() const { return m_window; }
|
||||
|
|
|
@ -79,7 +79,7 @@ Gfx::Bitmap const& Compositor::front_bitmap_for_screenshot(Badge<ConnectionFromC
|
|||
return *screen.compositor_screen_data().m_front_bitmap;
|
||||
}
|
||||
|
||||
Gfx::Color Compositor::color_at_position(Badge<ConnectionFromClient>, Screen& screen, Gfx::IntPoint const& position) const
|
||||
Gfx::Color Compositor::color_at_position(Badge<ConnectionFromClient>, Screen& screen, Gfx::IntPoint position) const
|
||||
{
|
||||
return screen.compositor_screen_data().m_front_bitmap->get_pixel(position);
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ public:
|
|||
|
||||
Gfx::Bitmap const* cursor_bitmap_for_screenshot(Badge<ConnectionFromClient>, Screen&) const;
|
||||
Gfx::Bitmap const& front_bitmap_for_screenshot(Badge<ConnectionFromClient>, Screen&) const;
|
||||
Gfx::Color color_at_position(Badge<ConnectionFromClient>, Screen&, Gfx::IntPoint const&) const;
|
||||
Gfx::Color color_at_position(Badge<ConnectionFromClient>, Screen&, Gfx::IntPoint) const;
|
||||
|
||||
void register_animation(Badge<Animation>, Animation&);
|
||||
void unregister_animation(Badge<Animation>, Animation&);
|
||||
|
|
|
@ -145,7 +145,7 @@ void ConnectionFromClient::add_menu_item(i32 menu_id, i32 identifier, i32 submen
|
|||
menu.add_item(move(menu_item));
|
||||
}
|
||||
|
||||
void ConnectionFromClient::popup_menu(i32 menu_id, Gfx::IntPoint const& screen_position, Gfx::IntRect const& button_rect)
|
||||
void ConnectionFromClient::popup_menu(i32 menu_id, Gfx::IntPoint screen_position, Gfx::IntRect const& button_rect)
|
||||
{
|
||||
auto position = screen_position;
|
||||
auto it = m_menus.find(menu_id);
|
||||
|
@ -1040,7 +1040,7 @@ void ConnectionFromClient::pong()
|
|||
set_unresponsive(false);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_global_cursor_position(Gfx::IntPoint const& position)
|
||||
void ConnectionFromClient::set_global_cursor_position(Gfx::IntPoint position)
|
||||
{
|
||||
if (!Screen::main().rect().contains(position)) {
|
||||
did_misbehave("SetGlobalCursorPosition with bad position");
|
||||
|
|
|
@ -140,7 +140,7 @@ private:
|
|||
virtual void show_screen_numbers(bool) override;
|
||||
virtual void set_window_cursor(i32, i32) override;
|
||||
virtual void set_window_custom_cursor(i32, Gfx::ShareableBitmap const&) override;
|
||||
virtual void popup_menu(i32, Gfx::IntPoint const&, Gfx::IntRect const&) override;
|
||||
virtual void popup_menu(i32, Gfx::IntPoint, Gfx::IntRect const&) override;
|
||||
virtual void dismiss_menu(i32) override;
|
||||
virtual void set_window_icon_bitmap(i32, Gfx::ShareableBitmap const&) override;
|
||||
virtual Messages::WindowServer::StartDragResponse start_drag(DeprecatedString const&, HashMap<DeprecatedString, ByteBuffer> const&, Gfx::ShareableBitmap const&) override;
|
||||
|
@ -166,7 +166,7 @@ private:
|
|||
virtual void set_window_progress(i32, Optional<i32> const&) override;
|
||||
virtual void refresh_system_theme() override;
|
||||
virtual void pong() override;
|
||||
virtual void set_global_cursor_position(Gfx::IntPoint const&) override;
|
||||
virtual void set_global_cursor_position(Gfx::IntPoint) override;
|
||||
virtual Messages::WindowServer::GetGlobalCursorPositionResponse get_global_cursor_position() override;
|
||||
virtual void set_mouse_acceleration(float) override;
|
||||
virtual Messages::WindowServer::GetMouseAccelerationResponse get_mouse_acceleration() override;
|
||||
|
|
|
@ -89,7 +89,7 @@ private:
|
|||
|
||||
class MouseEvent final : public Event {
|
||||
public:
|
||||
MouseEvent(Type type, Gfx::IntPoint const& position, unsigned buttons, MouseButton button, unsigned modifiers, int wheel_delta_x = 0, int wheel_delta_y = 0, int wheel_raw_delta_x = 0, int wheel_raw_delta_y = 0)
|
||||
MouseEvent(Type type, Gfx::IntPoint position, unsigned buttons, MouseButton button, unsigned modifiers, int wheel_delta_x = 0, int wheel_delta_y = 0, int wheel_raw_delta_x = 0, int wheel_raw_delta_y = 0)
|
||||
: Event(type)
|
||||
, m_position(position)
|
||||
, m_buttons(buttons)
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
Gfx::IntPoint const& position() const { return m_position; }
|
||||
Gfx::IntPoint position() const { return m_position; }
|
||||
int x() const { return m_position.x(); }
|
||||
int y() const { return m_position.y(); }
|
||||
MouseButton button() const { return m_button; }
|
||||
|
@ -124,7 +124,7 @@ public:
|
|||
void set_drag(bool b) { m_drag = b; }
|
||||
void set_mime_data(Core::MimeData const& mime_data) { m_mime_data = mime_data; }
|
||||
|
||||
MouseEvent translated(Gfx::IntPoint const& delta) const
|
||||
MouseEvent translated(Gfx::IntPoint delta) const
|
||||
{
|
||||
MouseEvent event = *this;
|
||||
event.m_position = m_position.translated(delta);
|
||||
|
|
|
@ -112,7 +112,7 @@ void Menu::redraw(MenuItem const& menu_item)
|
|||
menu_window()->invalidate(menu_item.rect());
|
||||
}
|
||||
|
||||
Window& Menu::ensure_menu_window(Gfx::IntPoint const& position)
|
||||
Window& Menu::ensure_menu_window(Gfx::IntPoint position)
|
||||
{
|
||||
auto& screen = Screen::closest_to_location(position);
|
||||
int width = this->content_width();
|
||||
|
@ -575,7 +575,7 @@ bool Menu::remove_item_with_identifier(unsigned identifier)
|
|||
return m_items.remove_first_matching([&](auto& item) { return item->identifier() == identifier; });
|
||||
}
|
||||
|
||||
int Menu::item_index_at(Gfx::IntPoint const& position)
|
||||
int Menu::item_index_at(Gfx::IntPoint position)
|
||||
{
|
||||
int i = 0;
|
||||
for (auto& item : m_items) {
|
||||
|
@ -597,7 +597,7 @@ void Menu::redraw_if_theme_changed()
|
|||
redraw();
|
||||
}
|
||||
|
||||
void Menu::open_button_menu(Gfx::IntPoint const& position, Gfx::IntRect const& button_rect)
|
||||
void Menu::open_button_menu(Gfx::IntPoint position, Gfx::IntRect const& button_rect)
|
||||
{
|
||||
if (is_empty())
|
||||
return;
|
||||
|
@ -618,12 +618,12 @@ void Menu::open_button_menu(Gfx::IntPoint const& position, Gfx::IntRect const& b
|
|||
WindowManager::the().did_popup_a_menu({});
|
||||
}
|
||||
|
||||
void Menu::popup(Gfx::IntPoint const& position)
|
||||
void Menu::popup(Gfx::IntPoint position)
|
||||
{
|
||||
do_popup(position, true);
|
||||
}
|
||||
|
||||
void Menu::do_popup(Gfx::IntPoint const& position, bool make_input, bool as_submenu)
|
||||
void Menu::do_popup(Gfx::IntPoint position, bool make_input, bool as_submenu)
|
||||
{
|
||||
if (is_empty()) {
|
||||
dbgln("Menu: Empty menu popup");
|
||||
|
|
|
@ -76,10 +76,10 @@ public:
|
|||
void set_rect_in_window_menubar(Gfx::IntRect const& rect) { m_rect_in_window_menubar = rect; }
|
||||
|
||||
Gfx::IntPoint unadjusted_position() const { return m_unadjusted_position; }
|
||||
void set_unadjusted_position(Gfx::IntPoint const& position) { m_unadjusted_position = position; }
|
||||
void set_unadjusted_position(Gfx::IntPoint position) { m_unadjusted_position = position; }
|
||||
|
||||
Window* menu_window() { return m_menu_window.ptr(); }
|
||||
Window& ensure_menu_window(Gfx::IntPoint const&);
|
||||
Window& ensure_menu_window(Gfx::IntPoint);
|
||||
|
||||
Window* window_menu_of() { return m_window_menu_of; }
|
||||
void set_window_menu_of(Window& window) { m_window_menu_of = window; }
|
||||
|
@ -118,9 +118,9 @@ public:
|
|||
|
||||
void set_visible(bool);
|
||||
|
||||
void popup(Gfx::IntPoint const&);
|
||||
void do_popup(Gfx::IntPoint const&, bool make_input, bool as_submenu = false);
|
||||
void open_button_menu(Gfx::IntPoint const& position, Gfx::IntRect const& button_rect);
|
||||
void popup(Gfx::IntPoint);
|
||||
void do_popup(Gfx::IntPoint, bool make_input, bool as_submenu = false);
|
||||
void open_button_menu(Gfx::IntPoint position, Gfx::IntRect const& button_rect);
|
||||
|
||||
bool is_menu_ancestor_of(Menu const&) const;
|
||||
|
||||
|
@ -143,7 +143,7 @@ private:
|
|||
size_t visible_item_count() const;
|
||||
Gfx::IntRect stripe_rect();
|
||||
|
||||
int item_index_at(Gfx::IntPoint const&);
|
||||
int item_index_at(Gfx::IntPoint);
|
||||
static constexpr int padding_between_text_and_shortcut() { return 50; }
|
||||
void did_activate(MenuItem&, bool leave_menu_open);
|
||||
void update_for_new_hovered_item(bool make_input = false);
|
||||
|
|
|
@ -293,7 +293,7 @@ Screen& Screen::closest_to_rect(Gfx::IntRect const& rect)
|
|||
return *best_screen;
|
||||
}
|
||||
|
||||
Screen& Screen::closest_to_location(Gfx::IntPoint const& point)
|
||||
Screen& Screen::closest_to_location(Gfx::IntPoint point)
|
||||
{
|
||||
for (auto& screen : s_screens) {
|
||||
if (screen.rect().contains(point))
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
}
|
||||
|
||||
static Screen& closest_to_rect(Gfx::IntRect const&);
|
||||
static Screen& closest_to_location(Gfx::IntPoint const&);
|
||||
static Screen& closest_to_location(Gfx::IntPoint);
|
||||
|
||||
static Screen* find_by_index(size_t index)
|
||||
{
|
||||
|
@ -109,7 +109,7 @@ public:
|
|||
return rects;
|
||||
}
|
||||
|
||||
static Screen* find_by_location(Gfx::IntPoint const& point)
|
||||
static Screen* find_by_location(Gfx::IntPoint point)
|
||||
{
|
||||
for (auto& screen : s_screens) {
|
||||
if (screen.rect().contains(point))
|
||||
|
|
|
@ -33,7 +33,7 @@ void WMConnectionFromClient::die()
|
|||
});
|
||||
}
|
||||
|
||||
void WMConnectionFromClient::set_applet_area_position(Gfx::IntPoint const& position)
|
||||
void WMConnectionFromClient::set_applet_area_position(Gfx::IntPoint position)
|
||||
{
|
||||
if (m_window_id < 0) {
|
||||
did_misbehave("SetAppletAreaPosition: WM didn't assign window as manager yet");
|
||||
|
@ -66,7 +66,7 @@ void WMConnectionFromClient::set_active_window(i32 client_id, i32 window_id)
|
|||
WindowManager::the().move_to_front_and_make_active(window);
|
||||
}
|
||||
|
||||
void WMConnectionFromClient::popup_window_menu(i32 client_id, i32 window_id, Gfx::IntPoint const& screen_position)
|
||||
void WMConnectionFromClient::popup_window_menu(i32 client_id, i32 window_id, Gfx::IntPoint screen_position)
|
||||
{
|
||||
auto* client = WindowServer::ConnectionFromClient::from_client_id(client_id);
|
||||
if (!client) {
|
||||
|
|
|
@ -25,9 +25,9 @@ public:
|
|||
virtual void set_window_minimized(i32, i32, bool) override;
|
||||
virtual void toggle_show_desktop() override;
|
||||
virtual void start_window_resize(i32, i32, i32) override;
|
||||
virtual void popup_window_menu(i32, i32, Gfx::IntPoint const&) override;
|
||||
virtual void popup_window_menu(i32, i32, Gfx::IntPoint) override;
|
||||
virtual void set_window_taskbar_rect(i32, i32, Gfx::IntRect const&) override;
|
||||
virtual void set_applet_area_position(Gfx::IntPoint const&) override;
|
||||
virtual void set_applet_area_position(Gfx::IntPoint) override;
|
||||
virtual void set_event_mask(u32) override;
|
||||
virtual void set_manager_window(i32) override;
|
||||
virtual void set_workspace(u32, u32) override;
|
||||
|
|
|
@ -787,7 +787,7 @@ void Window::handle_window_menu_action(WindowMenuAction action)
|
|||
}
|
||||
}
|
||||
|
||||
void Window::popup_window_menu(Gfx::IntPoint const& position, WindowMenuDefaultAction default_action)
|
||||
void Window::popup_window_menu(Gfx::IntPoint position, WindowMenuDefaultAction default_action)
|
||||
{
|
||||
ensure_window_menu();
|
||||
if (default_action == WindowMenuDefaultAction::BasedOnWindowState) {
|
||||
|
@ -999,7 +999,7 @@ bool Window::is_descendant_of(Window& window) const
|
|||
return false;
|
||||
}
|
||||
|
||||
Optional<HitTestResult> Window::hit_test(Gfx::IntPoint const& position, bool include_frame)
|
||||
Optional<HitTestResult> Window::hit_test(Gfx::IntPoint position, bool include_frame)
|
||||
{
|
||||
if (!m_hit_testing_enabled)
|
||||
return {};
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
bool is_modified() const { return m_modified; }
|
||||
void set_modified(bool);
|
||||
|
||||
void popup_window_menu(Gfx::IntPoint const&, WindowMenuDefaultAction);
|
||||
void popup_window_menu(Gfx::IntPoint, WindowMenuDefaultAction);
|
||||
void handle_window_menu_action(WindowMenuAction);
|
||||
void window_menu_activate_default();
|
||||
void request_close();
|
||||
|
@ -166,7 +166,7 @@ public:
|
|||
m_alpha_hit_threshold = threshold;
|
||||
}
|
||||
|
||||
Optional<HitTestResult> hit_test(Gfx::IntPoint const&, bool include_frame = true);
|
||||
Optional<HitTestResult> hit_test(Gfx::IntPoint, bool include_frame = true);
|
||||
|
||||
int x() const { return m_rect.x(); }
|
||||
int y() const { return m_rect.y(); }
|
||||
|
@ -201,14 +201,14 @@ public:
|
|||
void set_taskbar_rect(Gfx::IntRect const&);
|
||||
Gfx::IntRect const& taskbar_rect() const { return m_taskbar_rect; }
|
||||
|
||||
void move_to(Gfx::IntPoint const& position) { set_rect({ position, size() }); }
|
||||
void move_to(Gfx::IntPoint position) { set_rect({ position, size() }); }
|
||||
void move_to(int x, int y) { move_to({ x, y }); }
|
||||
|
||||
void move_by(Gfx::IntPoint const& delta) { set_position_without_repaint(position().translated(delta)); }
|
||||
void move_by(Gfx::IntPoint delta) { set_position_without_repaint(position().translated(delta)); }
|
||||
|
||||
Gfx::IntPoint position() const { return m_rect.location(); }
|
||||
void set_position(Gfx::IntPoint const& position) { set_rect({ position.x(), position.y(), width(), height() }); }
|
||||
void set_position_without_repaint(Gfx::IntPoint const& position) { set_rect_without_repaint({ position.x(), position.y(), width(), height() }); }
|
||||
void set_position(Gfx::IntPoint position) { set_rect({ position.x(), position.y(), width(), height() }); }
|
||||
void set_position_without_repaint(Gfx::IntPoint position) { set_rect_without_repaint({ position.x(), position.y(), width(), height() }); }
|
||||
|
||||
Gfx::IntSize size() const { return m_rect.size(); }
|
||||
|
||||
|
|
|
@ -680,7 +680,7 @@ void WindowFrame::layout_buttons()
|
|||
m_buttons[i].set_relative_rect(button_rects[i]);
|
||||
}
|
||||
|
||||
Optional<HitTestResult> WindowFrame::hit_test(Gfx::IntPoint const& position)
|
||||
Optional<HitTestResult> WindowFrame::hit_test(Gfx::IntPoint position)
|
||||
{
|
||||
if (m_window.is_frameless() || m_window.is_fullscreen())
|
||||
return {};
|
||||
|
@ -706,7 +706,7 @@ Optional<HitTestResult> WindowFrame::hit_test(Gfx::IntPoint const& position)
|
|||
return cached->hit_test(*this, position, window_relative_position);
|
||||
}
|
||||
|
||||
Optional<HitTestResult> WindowFrame::PerScaleRenderedCache::hit_test(WindowFrame& frame, Gfx::IntPoint const& position, Gfx::IntPoint const& window_relative_position)
|
||||
Optional<HitTestResult> WindowFrame::PerScaleRenderedCache::hit_test(WindowFrame& frame, Gfx::IntPoint position, Gfx::IntPoint window_relative_position)
|
||||
{
|
||||
HitTestResult result {
|
||||
.window = frame.window(),
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
public:
|
||||
void paint(WindowFrame&, Gfx::Painter&, Gfx::IntRect const&);
|
||||
void render(WindowFrame&, Screen&);
|
||||
Optional<HitTestResult> hit_test(WindowFrame&, Gfx::IntPoint const&, Gfx::IntPoint const&);
|
||||
Optional<HitTestResult> hit_test(WindowFrame&, Gfx::IntPoint, Gfx::IntPoint);
|
||||
|
||||
private:
|
||||
RefPtr<Gfx::Bitmap> m_top_bottom;
|
||||
|
@ -115,7 +115,7 @@ public:
|
|||
|
||||
void theme_changed();
|
||||
|
||||
Optional<HitTestResult> hit_test(Gfx::IntPoint const&);
|
||||
Optional<HitTestResult> hit_test(Gfx::IntPoint);
|
||||
|
||||
void open_menubar_menu(Menu&);
|
||||
|
||||
|
|
|
@ -684,7 +684,7 @@ void WindowManager::check_hide_geometry_overlay(Window& window)
|
|||
m_geometry_overlay = nullptr;
|
||||
}
|
||||
|
||||
void WindowManager::start_window_move(Window& window, Gfx::IntPoint const& origin)
|
||||
void WindowManager::start_window_move(Window& window, Gfx::IntPoint origin)
|
||||
{
|
||||
MenuManager::the().close_everyone();
|
||||
|
||||
|
@ -708,7 +708,7 @@ void WindowManager::start_window_move(Window& window, MouseEvent const& event)
|
|||
start_window_move(window, event.position());
|
||||
}
|
||||
|
||||
void WindowManager::start_window_resize(Window& window, Gfx::IntPoint const& position, MouseButton button, ResizeDirection resize_direction)
|
||||
void WindowManager::start_window_resize(Window& window, Gfx::IntPoint position, MouseButton button, ResizeDirection resize_direction)
|
||||
{
|
||||
MenuManager::the().close_everyone();
|
||||
|
||||
|
@ -830,7 +830,7 @@ bool WindowManager::process_ongoing_window_move(MouseEvent& event)
|
|||
return true;
|
||||
}
|
||||
|
||||
Gfx::IntPoint WindowManager::to_floating_cursor_position(Gfx::IntPoint const& origin) const
|
||||
Gfx::IntPoint WindowManager::to_floating_cursor_position(Gfx::IntPoint origin) const
|
||||
{
|
||||
VERIFY(m_move_window);
|
||||
|
||||
|
@ -2157,7 +2157,7 @@ void WindowManager::set_always_on_top(Window& window, bool always_on_top)
|
|||
});
|
||||
}
|
||||
|
||||
Gfx::IntPoint WindowManager::get_recommended_window_position(Gfx::IntPoint const& desired)
|
||||
Gfx::IntPoint WindowManager::get_recommended_window_position(Gfx::IntPoint desired)
|
||||
{
|
||||
// FIXME: Find a better source for the width and height to shift by.
|
||||
Gfx::IntPoint shift(8, Gfx::WindowTheme::current().titlebar_height(Gfx::WindowTheme::WindowType::Normal, Gfx::WindowTheme::WindowMode::Other, palette()) + 10);
|
||||
|
|
|
@ -180,10 +180,10 @@ public:
|
|||
|
||||
void check_hide_geometry_overlay(Window&);
|
||||
|
||||
void start_window_resize(Window&, Gfx::IntPoint const&, MouseButton, ResizeDirection);
|
||||
void start_window_resize(Window&, Gfx::IntPoint, MouseButton, ResizeDirection);
|
||||
void start_window_resize(Window&, MouseEvent const&, ResizeDirection);
|
||||
void start_window_move(Window&, MouseEvent const&);
|
||||
void start_window_move(Window&, Gfx::IntPoint const&);
|
||||
void start_window_move(Window&, Gfx::IntPoint);
|
||||
|
||||
Window const* active_fullscreen_window() const
|
||||
{
|
||||
|
@ -246,7 +246,7 @@ public:
|
|||
}
|
||||
bool is_window_in_modal_chain(Window& chain_window, Window& other_window);
|
||||
|
||||
Gfx::IntPoint get_recommended_window_position(Gfx::IntPoint const& desired);
|
||||
Gfx::IntPoint get_recommended_window_position(Gfx::IntPoint desired);
|
||||
|
||||
void reload_icon_bitmaps_after_scale_change();
|
||||
|
||||
|
@ -428,7 +428,7 @@ private:
|
|||
|
||||
bool is_considered_doubleclick(MouseEvent const&, DoubleClickInfo::ClickMetadata const&) const;
|
||||
|
||||
Gfx::IntPoint to_floating_cursor_position(Gfx::IntPoint const&) const;
|
||||
Gfx::IntPoint to_floating_cursor_position(Gfx::IntPoint) const;
|
||||
|
||||
DoubleClickInfo m_double_click_info;
|
||||
int m_double_click_speed { 0 };
|
||||
|
|
|
@ -99,7 +99,7 @@ void WindowStack::move_all_windows(WindowStack& new_window_stack, Vector<Window*
|
|||
m_active_window = nullptr;
|
||||
}
|
||||
|
||||
Window* WindowStack::window_at(Gfx::IntPoint const& position, IncludeWindowFrame include_window_frame) const
|
||||
Window* WindowStack::window_at(Gfx::IntPoint position, IncludeWindowFrame include_window_frame) const
|
||||
{
|
||||
auto result = hit_test(position);
|
||||
if (!result.has_value())
|
||||
|
@ -132,7 +132,7 @@ void WindowStack::set_all_occluded(bool occluded)
|
|||
}
|
||||
}
|
||||
|
||||
Optional<HitTestResult> WindowStack::hit_test(Gfx::IntPoint const& position) const
|
||||
Optional<HitTestResult> WindowStack::hit_test(Gfx::IntPoint position) const
|
||||
{
|
||||
Optional<HitTestResult> result;
|
||||
WindowManager::the().for_each_visible_window_from_front_to_back([&](Window& window) {
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
Yes,
|
||||
No,
|
||||
};
|
||||
Window* window_at(Gfx::IntPoint const&, IncludeWindowFrame = IncludeWindowFrame::Yes) const;
|
||||
Window* window_at(Gfx::IntPoint, IncludeWindowFrame = IncludeWindowFrame::Yes) const;
|
||||
Window* highlight_window() const;
|
||||
|
||||
template<typename Callback>
|
||||
|
@ -56,13 +56,13 @@ public:
|
|||
Window const* active_window() const { return m_active_window; }
|
||||
void set_active_window(Window*);
|
||||
|
||||
Optional<HitTestResult> hit_test(Gfx::IntPoint const&) const;
|
||||
Optional<HitTestResult> hit_test(Gfx::IntPoint) const;
|
||||
|
||||
unsigned row() const { return m_row; }
|
||||
unsigned column() const { return m_column; }
|
||||
|
||||
void set_transition_offset(Badge<Compositor>, Gfx::IntPoint const& transition_offset) { m_transition_offset = transition_offset; }
|
||||
Gfx::IntPoint const& transition_offset() const { return m_transition_offset; }
|
||||
void set_transition_offset(Badge<Compositor>, Gfx::IntPoint transition_offset) { m_transition_offset = transition_offset; }
|
||||
Gfx::IntPoint transition_offset() const { return m_transition_offset; }
|
||||
|
||||
void set_stationary_window_stack(WindowStack& window_stack) { m_stationary_window_stack = &window_stack; }
|
||||
WindowStack& stationary_window_stack()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue