1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:57:46 +00:00

Meta+Userland: Pass Gfx::IntSize by value

Just two ints like Gfx::IntPoint.
This commit is contained in:
MacDue 2022-12-06 21:35:32 +00:00 committed by Andreas Kling
parent e011eafd37
commit 27fae78335
63 changed files with 142 additions and 142 deletions

View file

@ -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();

View file

@ -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;

View file

@ -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)

View file

@ -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); }

View file

@ -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)

View file

@ -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();