mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
Meta+Userland: Pass Gfx::IntSize by value
Just two ints like Gfx::IntPoint.
This commit is contained in:
parent
e011eafd37
commit
27fae78335
63 changed files with 142 additions and 142 deletions
|
@ -535,7 +535,7 @@ void ConnectionFromClient::set_window_position(Gfx::IntPoint position)
|
|||
m_page_host->set_window_position(position);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_window_size(Gfx::IntSize const& size)
|
||||
void ConnectionFromClient::set_window_size(Gfx::IntSize size)
|
||||
{
|
||||
m_page_host->set_window_size(size);
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ private:
|
|||
virtual void set_has_focus(bool) override;
|
||||
virtual void set_is_scripting_enabled(bool) override;
|
||||
virtual void set_window_position(Gfx::IntPoint) override;
|
||||
virtual void set_window_size(Gfx::IntSize const&) override;
|
||||
virtual void set_window_size(Gfx::IntSize) 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;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ void PageHost::set_window_position(Gfx::IntPoint position)
|
|||
page().set_window_position(position);
|
||||
}
|
||||
|
||||
void PageHost::set_window_size(Gfx::IntSize const& size)
|
||||
void PageHost::set_window_size(Gfx::IntSize size)
|
||||
{
|
||||
page().set_window_size(size);
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void PageHost::page_did_request_refresh()
|
|||
m_client.async_did_request_refresh();
|
||||
}
|
||||
|
||||
Gfx::IntSize PageHost::page_did_request_resize_window(Gfx::IntSize const& size)
|
||||
Gfx::IntSize PageHost::page_did_request_resize_window(Gfx::IntSize size)
|
||||
{
|
||||
return m_client.did_request_resize_window(size);
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@ public:
|
|||
void set_has_focus(bool);
|
||||
void set_is_scripting_enabled(bool);
|
||||
void set_window_position(Gfx::IntPoint);
|
||||
void set_window_size(Gfx::IntSize const&);
|
||||
void set_window_size(Gfx::IntSize);
|
||||
|
||||
Gfx::IntSize const& content_size() const { return m_content_size; }
|
||||
Gfx::IntSize content_size() const { return m_content_size; }
|
||||
|
||||
ErrorOr<void> connect_to_webdriver(DeprecatedString const& webdriver_ipc_path);
|
||||
|
||||
|
@ -60,7 +60,7 @@ private:
|
|||
virtual void page_did_request_navigate_back() override;
|
||||
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::IntSize page_did_request_resize_window(Gfx::IntSize) 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;
|
||||
|
|
|
@ -523,7 +523,7 @@ static Gfx::IntSize calculate_minimum_size_for_window(Window const& window)
|
|||
return { 0, 0 };
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_window_minimum_size(i32 window_id, Gfx::IntSize const& size)
|
||||
void ConnectionFromClient::set_window_minimum_size(i32 window_id, Gfx::IntSize size)
|
||||
{
|
||||
auto it = m_windows.find(window_id);
|
||||
if (it == m_windows.end()) {
|
||||
|
@ -588,8 +588,8 @@ Window* ConnectionFromClient::window_from_id(i32 window_id)
|
|||
void ConnectionFromClient::create_window(i32 window_id, Gfx::IntRect const& rect,
|
||||
bool auto_position, bool has_alpha_channel, bool minimizable, bool closeable, bool resizable,
|
||||
bool fullscreen, bool frameless, bool forced_shadow, float opacity,
|
||||
float alpha_hit_threshold, Gfx::IntSize const& base_size, Gfx::IntSize const& size_increment,
|
||||
Gfx::IntSize const& minimum_size, Optional<Gfx::IntSize> const& resize_aspect_ratio, i32 type, i32 mode,
|
||||
float alpha_hit_threshold, Gfx::IntSize base_size, Gfx::IntSize size_increment,
|
||||
Gfx::IntSize minimum_size, Optional<Gfx::IntSize> const& resize_aspect_ratio, i32 type, i32 mode,
|
||||
DeprecatedString const& title, i32 parent_window_id, Gfx::IntRect const& launch_origin_rect)
|
||||
{
|
||||
Window* parent_window = nullptr;
|
||||
|
@ -732,7 +732,7 @@ void ConnectionFromClient::did_finish_painting(i32 window_id, Vector<Gfx::IntRec
|
|||
|
||||
void ConnectionFromClient::set_window_backing_store(i32 window_id, [[maybe_unused]] i32 bpp,
|
||||
[[maybe_unused]] i32 pitch, IPC::File const& anon_file, i32 serial, bool has_alpha_channel,
|
||||
Gfx::IntSize const& size, bool flush_immediately)
|
||||
Gfx::IntSize size, bool flush_immediately)
|
||||
{
|
||||
auto it = m_windows.find(window_id);
|
||||
if (it == m_windows.end()) {
|
||||
|
@ -969,7 +969,7 @@ void ConnectionFromClient::set_system_effects(Vector<bool> const& effects, u8 ge
|
|||
});
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_window_base_size_and_size_increment(i32 window_id, Gfx::IntSize const& base_size, Gfx::IntSize const& size_increment)
|
||||
void ConnectionFromClient::set_window_base_size_and_size_increment(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment)
|
||||
{
|
||||
auto it = m_windows.find(window_id);
|
||||
if (it == m_windows.end()) {
|
||||
|
@ -1191,7 +1191,7 @@ Messages::WindowServer::GetScreenBitmapResponse ConnectionFromClient::get_screen
|
|||
return { Gfx::ShareableBitmap() };
|
||||
}
|
||||
|
||||
Messages::WindowServer::GetScreenBitmapAroundCursorResponse ConnectionFromClient::get_screen_bitmap_around_cursor(Gfx::IntSize const& size)
|
||||
Messages::WindowServer::GetScreenBitmapAroundCursorResponse ConnectionFromClient::get_screen_bitmap_around_cursor(Gfx::IntSize size)
|
||||
{
|
||||
// TODO: Mixed scale setups at what scale? Lowest? Highest? Configurable?
|
||||
auto cursor_location = ScreenInput::the().cursor_location();
|
||||
|
|
|
@ -102,7 +102,7 @@ private:
|
|||
virtual void remove_menu_item(i32 menu_id, i32 identifier) override;
|
||||
virtual void flash_menubar_menu(i32, i32) override;
|
||||
virtual void create_window(i32, Gfx::IntRect const&, bool, bool, bool,
|
||||
bool, bool, bool, bool, bool, float, float, Gfx::IntSize const&, Gfx::IntSize const&, Gfx::IntSize const&,
|
||||
bool, bool, bool, bool, bool, float, float, Gfx::IntSize, Gfx::IntSize, Gfx::IntSize,
|
||||
Optional<Gfx::IntSize> const&, i32, i32, DeprecatedString const&, i32, Gfx::IntRect const&) override;
|
||||
virtual Messages::WindowServer::DestroyWindowResponse destroy_window(i32) override;
|
||||
virtual void set_window_title(i32, DeprecatedString const&) override;
|
||||
|
@ -114,14 +114,14 @@ private:
|
|||
virtual void start_window_resize(i32, i32) override;
|
||||
virtual Messages::WindowServer::SetWindowRectResponse set_window_rect(i32, Gfx::IntRect const&) override;
|
||||
virtual Messages::WindowServer::GetWindowRectResponse get_window_rect(i32) override;
|
||||
virtual void set_window_minimum_size(i32, Gfx::IntSize const&) override;
|
||||
virtual void set_window_minimum_size(i32, Gfx::IntSize) override;
|
||||
virtual Messages::WindowServer::GetWindowMinimumSizeResponse get_window_minimum_size(i32) override;
|
||||
virtual Messages::WindowServer::GetAppletRectOnScreenResponse get_applet_rect_on_screen(i32) override;
|
||||
virtual void invalidate_rect(i32, Vector<Gfx::IntRect> const&, bool) override;
|
||||
virtual void did_finish_painting(i32, Vector<Gfx::IntRect> const&) override;
|
||||
virtual void set_global_mouse_tracking(bool) override;
|
||||
virtual void set_window_opacity(i32, float) override;
|
||||
virtual void set_window_backing_store(i32, i32, i32, IPC::File const&, i32, bool, Gfx::IntSize const&, bool) override;
|
||||
virtual void set_window_backing_store(i32, i32, i32, IPC::File const&, i32, bool, Gfx::IntSize, bool) override;
|
||||
virtual void set_window_has_alpha_channel(i32, bool) override;
|
||||
virtual void set_window_alpha_hit_threshold(i32, float) override;
|
||||
virtual void move_window_to_front(i32) override;
|
||||
|
@ -159,7 +159,7 @@ private:
|
|||
virtual Messages::WindowServer::GetCursorThemeResponse get_cursor_theme() override;
|
||||
virtual Messages::WindowServer::SetSystemFontsResponse set_system_fonts(DeprecatedString const&, DeprecatedString const&, DeprecatedString const&) override;
|
||||
virtual void set_system_effects(Vector<bool> const&, u8) override;
|
||||
virtual void set_window_base_size_and_size_increment(i32, Gfx::IntSize const&, Gfx::IntSize const&) override;
|
||||
virtual void set_window_base_size_and_size_increment(i32, Gfx::IntSize, Gfx::IntSize) override;
|
||||
virtual void set_window_resize_aspect_ratio(i32, Optional<Gfx::IntSize> const&) override;
|
||||
virtual void enable_display_link() override;
|
||||
virtual void disable_display_link() override;
|
||||
|
@ -173,7 +173,7 @@ private:
|
|||
virtual void set_scroll_step_size(u32) override;
|
||||
virtual Messages::WindowServer::GetScrollStepSizeResponse get_scroll_step_size() override;
|
||||
virtual Messages::WindowServer::GetScreenBitmapResponse get_screen_bitmap(Optional<Gfx::IntRect> const&, Optional<u32> const&) override;
|
||||
virtual Messages::WindowServer::GetScreenBitmapAroundCursorResponse get_screen_bitmap_around_cursor(Gfx::IntSize const&) override;
|
||||
virtual Messages::WindowServer::GetScreenBitmapAroundCursorResponse get_screen_bitmap_around_cursor(Gfx::IntSize) override;
|
||||
virtual void set_double_click_speed(i32) override;
|
||||
virtual Messages::WindowServer::GetDoubleClickSpeedResponse get_double_click_speed() override;
|
||||
virtual void set_buttons_switched(bool) override;
|
||||
|
|
|
@ -188,7 +188,7 @@ bool Window::apply_minimum_size(Gfx::IntRect& rect)
|
|||
return did_size_clamp;
|
||||
}
|
||||
|
||||
void Window::set_minimum_size(Gfx::IntSize const& size)
|
||||
void Window::set_minimum_size(Gfx::IntSize size)
|
||||
{
|
||||
VERIFY(size.width() >= 0 && size.height() >= 0);
|
||||
if (m_minimum_size == size)
|
||||
|
|
|
@ -195,7 +195,7 @@ public:
|
|||
bool apply_minimum_size(Gfx::IntRect&);
|
||||
|
||||
Gfx::IntSize minimum_size() const { return m_minimum_size; }
|
||||
void set_minimum_size(Gfx::IntSize const&);
|
||||
void set_minimum_size(Gfx::IntSize);
|
||||
void set_minimum_size(int width, int height) { set_minimum_size({ width, height }); }
|
||||
|
||||
void set_taskbar_rect(Gfx::IntRect const&);
|
||||
|
@ -259,7 +259,7 @@ public:
|
|||
void set_has_alpha_channel(bool value);
|
||||
|
||||
Gfx::IntSize size_increment() const { return m_size_increment; }
|
||||
void set_size_increment(Gfx::IntSize const& increment) { m_size_increment = increment; }
|
||||
void set_size_increment(Gfx::IntSize increment) { m_size_increment = increment; }
|
||||
|
||||
Optional<Gfx::IntSize> const& resize_aspect_ratio() const { return m_resize_aspect_ratio; }
|
||||
void set_resize_aspect_ratio(Optional<Gfx::IntSize> const& ratio)
|
||||
|
@ -274,7 +274,7 @@ public:
|
|||
}
|
||||
|
||||
Gfx::IntSize base_size() const { return m_base_size; }
|
||||
void set_base_size(Gfx::IntSize const& size) { m_base_size = size; }
|
||||
void set_base_size(Gfx::IntSize size) { m_base_size = size; }
|
||||
|
||||
Gfx::Bitmap const& icon() const { return *m_icon; }
|
||||
void set_icon(NonnullRefPtr<Gfx::Bitmap>&& icon) { m_icon = move(icon); }
|
||||
|
|
|
@ -526,7 +526,7 @@ void WindowManager::tell_wms_screen_rects_changed()
|
|||
});
|
||||
}
|
||||
|
||||
void WindowManager::tell_wms_applet_area_size_changed(Gfx::IntSize const& size)
|
||||
void WindowManager::tell_wms_applet_area_size_changed(Gfx::IntSize size)
|
||||
{
|
||||
for_each_window_manager([&](WMConnectionFromClient& conn) {
|
||||
if (conn.window_id() < 0)
|
||||
|
|
|
@ -171,7 +171,7 @@ public:
|
|||
void tell_wms_window_icon_changed(Window&);
|
||||
void tell_wms_window_rect_changed(Window&);
|
||||
void tell_wms_screen_rects_changed();
|
||||
void tell_wms_applet_area_size_changed(Gfx::IntSize const&);
|
||||
void tell_wms_applet_area_size_changed(Gfx::IntSize);
|
||||
void tell_wms_super_key_pressed();
|
||||
void tell_wms_super_space_key_pressed();
|
||||
void tell_wms_super_d_key_pressed();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue