diff options
63 files changed, 142 insertions, 142 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp index e6f583076c..80a5b92203 100644 --- a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp @@ -69,7 +69,7 @@ static bool is_primitive_type(DeprecatedString const& type) static bool is_simple_type(DeprecatedString const& type) { // Small types that it makes sense just to pass by value. - return type.is_one_of("Gfx::Color", "Gfx::IntPoint", "Gfx::FloatPoint"); + return type.is_one_of("Gfx::Color", "Gfx::IntPoint", "Gfx::FloatPoint", "Gfx::IntSize"); } static bool is_primitive_or_simple_type(DeprecatedString const& type) diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index 68d1bc938d..56c55727a5 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -698,7 +698,7 @@ void BrowserWindow::broadcast_window_position(Gfx::IntPoint position) }); } -void BrowserWindow::broadcast_window_size(Gfx::IntSize const& size) +void BrowserWindow::broadcast_window_size(Gfx::IntSize size) { tab_widget().for_each_child_of_type<Browser::Tab>([&](auto& tab) { tab.window_size_changed(size); diff --git a/Userland/Applications/Browser/BrowserWindow.h b/Userland/Applications/Browser/BrowserWindow.h index 19b4c4e6df..82882d5159 100644 --- a/Userland/Applications/Browser/BrowserWindow.h +++ b/Userland/Applications/Browser/BrowserWindow.h @@ -46,7 +46,7 @@ public: void proxy_mappings_changed(); void broadcast_window_position(Gfx::IntPoint); - void broadcast_window_size(Gfx::IntSize const&); + void broadcast_window_size(Gfx::IntSize); private: explicit BrowserWindow(CookieJar&, URL); diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 38203900df..db097a87eb 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -277,7 +277,7 @@ Tab::Tab(BrowserWindow& window) return this->window().position(); }; - view().on_resize_window = [this](Gfx::IntSize const& size) { + view().on_resize_window = [this](Gfx::IntSize size) { this->window().resize(size); return this->window().size(); }; @@ -619,7 +619,7 @@ void Tab::window_position_changed(Gfx::IntPoint position) m_web_content_view->set_window_position(position); } -void Tab::window_size_changed(Gfx::IntSize const& size) +void Tab::window_size_changed(Gfx::IntSize size) { m_web_content_view->set_window_size(size); } diff --git a/Userland/Applications/Browser/Tab.h b/Userland/Applications/Browser/Tab.h index 61308248cb..e24e73646b 100644 --- a/Userland/Applications/Browser/Tab.h +++ b/Userland/Applications/Browser/Tab.h @@ -57,7 +57,7 @@ public: void action_left(GUI::Action&); void window_position_changed(Gfx::IntPoint); - void window_size_changed(Gfx::IntSize const&); + void window_size_changed(Gfx::IntSize); Function<void(DeprecatedString const&)> on_title_change; Function<void(const URL&)> on_tab_open_request; diff --git a/Userland/Applications/PixelPaint/CreateNewImageDialog.h b/Userland/Applications/PixelPaint/CreateNewImageDialog.h index b4280d0ff0..67bf5e0bae 100644 --- a/Userland/Applications/PixelPaint/CreateNewImageDialog.h +++ b/Userland/Applications/PixelPaint/CreateNewImageDialog.h @@ -14,7 +14,7 @@ class CreateNewImageDialog final : public GUI::Dialog { C_OBJECT(CreateNewImageDialog) public: - Gfx::IntSize const& image_size() const { return m_image_size; } + Gfx::IntSize image_size() const { return m_image_size; } DeprecatedString const& image_name() const { return m_image_name; } private: diff --git a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp index 89f41220bb..d923451e32 100644 --- a/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp +++ b/Userland/Applications/PixelPaint/CreateNewLayerDialog.cpp @@ -13,7 +13,7 @@ namespace PixelPaint { -CreateNewLayerDialog::CreateNewLayerDialog(Gfx::IntSize const& suggested_size, GUI::Window* parent_window) +CreateNewLayerDialog::CreateNewLayerDialog(Gfx::IntSize suggested_size, GUI::Window* parent_window) : Dialog(parent_window) { set_title("Create new layer"); diff --git a/Userland/Applications/PixelPaint/CreateNewLayerDialog.h b/Userland/Applications/PixelPaint/CreateNewLayerDialog.h index fb446b561b..b28d6a37f6 100644 --- a/Userland/Applications/PixelPaint/CreateNewLayerDialog.h +++ b/Userland/Applications/PixelPaint/CreateNewLayerDialog.h @@ -14,11 +14,11 @@ class CreateNewLayerDialog final : public GUI::Dialog { C_OBJECT(CreateNewLayerDialog); public: - Gfx::IntSize const& layer_size() const { return m_layer_size; } + Gfx::IntSize layer_size() const { return m_layer_size; } DeprecatedString const& layer_name() const { return m_layer_name; } private: - CreateNewLayerDialog(Gfx::IntSize const& suggested_size, GUI::Window* parent_window); + CreateNewLayerDialog(Gfx::IntSize suggested_size, GUI::Window* parent_window); Gfx::IntSize m_layer_size; DeprecatedString m_layer_name; diff --git a/Userland/Applications/PixelPaint/Image.cpp b/Userland/Applications/PixelPaint/Image.cpp index a77dd6a36c..9d7f971d59 100644 --- a/Userland/Applications/PixelPaint/Image.cpp +++ b/Userland/Applications/PixelPaint/Image.cpp @@ -24,7 +24,7 @@ namespace PixelPaint { -ErrorOr<NonnullRefPtr<Image>> Image::try_create_with_size(Gfx::IntSize const& size) +ErrorOr<NonnullRefPtr<Image>> Image::try_create_with_size(Gfx::IntSize size) { VERIFY(!size.is_empty()); @@ -34,7 +34,7 @@ ErrorOr<NonnullRefPtr<Image>> Image::try_create_with_size(Gfx::IntSize const& si return adopt_nonnull_ref_or_enomem(new (nothrow) Image(size)); } -Image::Image(Gfx::IntSize const& size) +Image::Image(Gfx::IntSize size) : m_size(size) , m_selection(*this) { @@ -548,7 +548,7 @@ Optional<Gfx::IntRect> Image::nonempty_content_bounding_rect() const return bounding_rect; } -void Image::resize(Gfx::IntSize const& new_size, Gfx::Painter::ScalingMode scaling_mode) +void Image::resize(Gfx::IntSize new_size, Gfx::Painter::ScalingMode scaling_mode) { float scale_x = 1.0f; float scale_y = 1.0f; diff --git a/Userland/Applications/PixelPaint/Image.h b/Userland/Applications/PixelPaint/Image.h index 6a8b2a26d6..3ad98ba468 100644 --- a/Userland/Applications/PixelPaint/Image.h +++ b/Userland/Applications/PixelPaint/Image.h @@ -46,7 +46,7 @@ protected: class Image : public RefCounted<Image> { public: - static ErrorOr<NonnullRefPtr<Image>> try_create_with_size(Gfx::IntSize const&); + static ErrorOr<NonnullRefPtr<Image>> try_create_with_size(Gfx::IntSize); static ErrorOr<NonnullRefPtr<Image>> try_create_from_pixel_paint_json(JsonObject const&); static ErrorOr<NonnullRefPtr<Image>> try_create_from_bitmap(NonnullRefPtr<Gfx::Bitmap>); @@ -63,7 +63,7 @@ public: Layer const& layer(size_t index) const { return m_layers.at(index); } Layer& layer(size_t index) { return m_layers.at(index); } - Gfx::IntSize const& size() const { return m_size; } + Gfx::IntSize size() const { return m_size; } Gfx::IntRect rect() const { return { {}, m_size }; } void add_layer(NonnullRefPtr<Layer>); @@ -100,14 +100,14 @@ public: void flip(Gfx::Orientation orientation); void rotate(Gfx::RotationDirection direction); void crop(Gfx::IntRect const& rect); - void resize(Gfx::IntSize const& new_size, Gfx::Painter::ScalingMode scaling_mode); + void resize(Gfx::IntSize new_size, Gfx::Painter::ScalingMode scaling_mode); Optional<Gfx::IntRect> nonempty_content_bounding_rect() const; Color color_at(Gfx::IntPoint point) const; private: - explicit Image(Gfx::IntSize const&); + explicit Image(Gfx::IntSize); void did_change(Gfx::IntRect const& modified_rect = {}); void did_change_rect(Gfx::IntRect const& modified_rect = {}); diff --git a/Userland/Applications/PixelPaint/Layer.cpp b/Userland/Applications/PixelPaint/Layer.cpp index a235818168..ef784a4308 100644 --- a/Userland/Applications/PixelPaint/Layer.cpp +++ b/Userland/Applications/PixelPaint/Layer.cpp @@ -16,7 +16,7 @@ namespace PixelPaint { -ErrorOr<NonnullRefPtr<Layer>> Layer::try_create_with_size(Image& image, Gfx::IntSize const& size, DeprecatedString name) +ErrorOr<NonnullRefPtr<Layer>> Layer::try_create_with_size(Image& image, Gfx::IntSize size, DeprecatedString name) { VERIFY(!size.is_empty()); @@ -221,7 +221,7 @@ void Layer::crop(Gfx::IntRect const& rect) did_modify_bitmap(); } -void Layer::resize(Gfx::IntSize const& new_size, Gfx::IntPoint new_location, Gfx::Painter::ScalingMode scaling_mode) +void Layer::resize(Gfx::IntSize new_size, Gfx::IntPoint new_location, Gfx::Painter::ScalingMode scaling_mode) { auto src_rect = Gfx::IntRect(Gfx::IntPoint(0, 0), size()); auto dst_rect = Gfx::IntRect(Gfx::IntPoint(0, 0), new_size); @@ -261,7 +261,7 @@ void Layer::resize(Gfx::IntRect const& new_rect, Gfx::Painter::ScalingMode scali resize(new_rect.size(), new_rect.location(), scaling_mode); } -void Layer::resize(Gfx::IntSize const& new_size, Gfx::Painter::ScalingMode scaling_mode) +void Layer::resize(Gfx::IntSize new_size, Gfx::Painter::ScalingMode scaling_mode) { resize(new_size, location(), scaling_mode); } diff --git a/Userland/Applications/PixelPaint/Layer.h b/Userland/Applications/PixelPaint/Layer.h index 22ccfb2d84..ba5e86d113 100644 --- a/Userland/Applications/PixelPaint/Layer.h +++ b/Userland/Applications/PixelPaint/Layer.h @@ -29,7 +29,7 @@ class Layer AK_MAKE_NONMOVABLE(Layer); public: - static ErrorOr<NonnullRefPtr<Layer>> try_create_with_size(Image&, Gfx::IntSize const&, DeprecatedString name); + static ErrorOr<NonnullRefPtr<Layer>> try_create_with_size(Image&, Gfx::IntSize, DeprecatedString name); static ErrorOr<NonnullRefPtr<Layer>> try_create_with_bitmap(Image&, NonnullRefPtr<Gfx::Bitmap>, DeprecatedString name); static ErrorOr<NonnullRefPtr<Layer>> try_create_snapshot(Image&, Layer const&); @@ -59,9 +59,9 @@ public: void flip(Gfx::Orientation orientation); void rotate(Gfx::RotationDirection direction); void crop(Gfx::IntRect const& rect); - void resize(Gfx::IntSize const& new_size, Gfx::Painter::ScalingMode scaling_mode); + void resize(Gfx::IntSize new_size, Gfx::Painter::ScalingMode scaling_mode); void resize(Gfx::IntRect const& new_rect, Gfx::Painter::ScalingMode scaling_mode); - void resize(Gfx::IntSize const& new_size, Gfx::IntPoint new_location, Gfx::Painter::ScalingMode scaling_mode); + void resize(Gfx::IntSize new_size, Gfx::IntPoint new_location, Gfx::Painter::ScalingMode scaling_mode); Optional<Gfx::IntRect> nonempty_content_bounding_rect() const; diff --git a/Userland/Applications/PixelPaint/ResizeImageDialog.cpp b/Userland/Applications/PixelPaint/ResizeImageDialog.cpp index 643658e65a..d198fc5c7b 100644 --- a/Userland/Applications/PixelPaint/ResizeImageDialog.cpp +++ b/Userland/Applications/PixelPaint/ResizeImageDialog.cpp @@ -16,7 +16,7 @@ namespace PixelPaint { -ResizeImageDialog::ResizeImageDialog(Gfx::IntSize const& suggested_size, GUI::Window* parent_window) +ResizeImageDialog::ResizeImageDialog(Gfx::IntSize suggested_size, GUI::Window* parent_window) : Dialog(parent_window) { m_desired_size.set_width(max(1, suggested_size.width())); diff --git a/Userland/Applications/PixelPaint/ResizeImageDialog.h b/Userland/Applications/PixelPaint/ResizeImageDialog.h index b74ae3d037..f4b58f0810 100644 --- a/Userland/Applications/PixelPaint/ResizeImageDialog.h +++ b/Userland/Applications/PixelPaint/ResizeImageDialog.h @@ -15,12 +15,12 @@ class ResizeImageDialog final : public GUI::Dialog { C_OBJECT(ResizeImageDialog); public: - Gfx::IntSize const& desired_size() const { return m_desired_size; } + Gfx::IntSize desired_size() const { return m_desired_size; } Gfx::Painter::ScalingMode scaling_mode() const { return m_scaling_mode; } bool should_rescale() const { return m_rescale_image; } private: - ResizeImageDialog(Gfx::IntSize const& starting_size, GUI::Window* parent_window); + ResizeImageDialog(Gfx::IntSize starting_size, GUI::Window* parent_window); Gfx::IntSize m_desired_size; Gfx::Painter::ScalingMode m_scaling_mode; diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 66fdaad891..0f6f7bea0c 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -302,7 +302,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) terminal->on_title_change = [&](auto title) { window->set_title(title); }; - terminal->on_terminal_size_change = [&](auto& size) { + terminal->on_terminal_size_change = [&](auto size) { window->resize(size); }; terminal->apply_size_increments_to_window(*window); diff --git a/Userland/Demos/Mandelbrot/Mandelbrot.cpp b/Userland/Demos/Mandelbrot/Mandelbrot.cpp index fe7581cf92..a9fd1caef8 100644 --- a/Userland/Demos/Mandelbrot/Mandelbrot.cpp +++ b/Userland/Demos/Mandelbrot/Mandelbrot.cpp @@ -37,7 +37,7 @@ public: calculate(); } - void resize(Gfx::IntSize const& size) + void resize(Gfx::IntSize size) { m_bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, size).release_value_but_fixme_should_propagate_errors(); correct_aspect(); diff --git a/Userland/Libraries/LibGPU/Device.h b/Userland/Libraries/LibGPU/Device.h index 270d44dfc0..7b08f315c5 100644 --- a/Userland/Libraries/LibGPU/Device.h +++ b/Userland/Libraries/LibGPU/Device.h @@ -39,7 +39,7 @@ public: virtual DeviceInfo info() const = 0; virtual void draw_primitives(PrimitiveType, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform, Vector<Vertex>& vertices) = 0; - virtual void resize(Gfx::IntSize const& min_size) = 0; + virtual void resize(Gfx::IntSize min_size) = 0; virtual void clear_color(FloatVector4 const&) = 0; virtual void clear_depth(DepthType) = 0; virtual void clear_stencil(StencilType) = 0; @@ -71,6 +71,6 @@ public: } -typedef GPU::Device* (*serenity_gpu_create_device_t)(Gfx::IntSize const& size); +typedef GPU::Device* (*serenity_gpu_create_device_t)(Gfx::IntSize size); -extern "C" GPU::Device* serenity_gpu_create_device(Gfx::IntSize const& size); +extern "C" GPU::Device* serenity_gpu_create_device(Gfx::IntSize size); diff --git a/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp b/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp index 28b78847df..340136a31e 100644 --- a/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp +++ b/Userland/Libraries/LibGUI/AbstractScrollableWidget.cpp @@ -196,7 +196,7 @@ void AbstractScrollableWidget::update_scrollbar_visibility() } } -void AbstractScrollableWidget::set_content_size(Gfx::IntSize const& size) +void AbstractScrollableWidget::set_content_size(Gfx::IntSize size) { if (m_content_size == size) return; @@ -204,7 +204,7 @@ void AbstractScrollableWidget::set_content_size(Gfx::IntSize const& size) update_scrollbar_ranges(); } -void AbstractScrollableWidget::set_min_content_size(Gfx::IntSize const& min_size) +void AbstractScrollableWidget::set_min_content_size(Gfx::IntSize min_size) { if (m_min_content_size == min_size) return; @@ -212,7 +212,7 @@ void AbstractScrollableWidget::set_min_content_size(Gfx::IntSize const& min_size update_scrollbar_ranges(); } -void AbstractScrollableWidget::set_size_occupied_by_fixed_elements(Gfx::IntSize const& size) +void AbstractScrollableWidget::set_size_occupied_by_fixed_elements(Gfx::IntSize size) { if (m_size_occupied_by_fixed_elements == size) return; diff --git a/Userland/Libraries/LibGUI/AbstractScrollableWidget.h b/Userland/Libraries/LibGUI/AbstractScrollableWidget.h index 492e197f66..d35113d9cc 100644 --- a/Userland/Libraries/LibGUI/AbstractScrollableWidget.h +++ b/Userland/Libraries/LibGUI/AbstractScrollableWidget.h @@ -84,9 +84,9 @@ protected: virtual void resize_event(ResizeEvent&) override; virtual void mousewheel_event(MouseEvent&) override; virtual void did_scroll() { } - void set_content_size(Gfx::IntSize const&); - void set_min_content_size(Gfx::IntSize const&); - void set_size_occupied_by_fixed_elements(Gfx::IntSize const&); + void set_content_size(Gfx::IntSize); + void set_min_content_size(Gfx::IntSize); + void set_size_occupied_by_fixed_elements(Gfx::IntSize); virtual void on_automatic_scrolling_timer_fired() {}; int autoscroll_threshold() const { return m_autoscroll_threshold; } void update_scrollbar_visibility(); diff --git a/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.cpp b/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.cpp index 5299ddf086..31bde9f50c 100644 --- a/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.cpp +++ b/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.cpp @@ -26,7 +26,7 @@ void ConnectionToWindowManagerServer::window_state_changed(i32 wm_id, i32 client Core::EventLoop::current().post_event(*window, make<WMWindowStateChangedEvent>(client_id, window_id, title, rect, workspace_row, workspace_column, is_active, is_blocked, static_cast<WindowType>(window_type), is_minimized, is_frameless, progress)); } -void ConnectionToWindowManagerServer::applet_area_size_changed(i32 wm_id, Gfx::IntSize const& size) +void ConnectionToWindowManagerServer::applet_area_size_changed(i32 wm_id, Gfx::IntSize size) { if (auto* window = Window::from_window_id(wm_id)) Core::EventLoop::current().post_event(*window, make<WMAppletAreaSizeChangedEvent>(size)); diff --git a/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.h b/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.h index d569a1a73a..dc9562881e 100644 --- a/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.h +++ b/Userland/Libraries/LibGUI/ConnectionToWindowManagerServer.h @@ -31,7 +31,7 @@ private: virtual void window_state_changed(i32, i32, i32, u32, u32, bool, bool, bool, bool, i32, DeprecatedString const&, Gfx::IntRect const&, Optional<i32> const&) override; virtual void window_icon_bitmap_changed(i32, i32, i32, Gfx::ShareableBitmap const&) override; virtual void window_rect_changed(i32, i32, i32, Gfx::IntRect const&) override; - virtual void applet_area_size_changed(i32, Gfx::IntSize const&) override; + virtual void applet_area_size_changed(i32, Gfx::IntSize) override; virtual void super_key_pressed(i32) override; virtual void super_space_key_pressed(i32) override; virtual void super_d_key_pressed(i32) override; diff --git a/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp b/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp index 83b7acd3b3..249f10d4ee 100644 --- a/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp +++ b/Userland/Libraries/LibGUI/ConnectionToWindowServer.cpp @@ -89,7 +89,7 @@ void ConnectionToWindowServer::update_system_effects(Vector<bool> const& effects Desktop::the().set_system_effects(effects); } -void ConnectionToWindowServer::paint(i32 window_id, Gfx::IntSize const& window_size, Vector<Gfx::IntRect> const& rects) +void ConnectionToWindowServer::paint(i32 window_id, Gfx::IntSize window_size, Vector<Gfx::IntRect> const& rects) { if (auto* window = Window::from_window_id(window_id)) Core::EventLoop::current().post_event(*window, make<MultiPaintEvent>(rects, window_size)); diff --git a/Userland/Libraries/LibGUI/ConnectionToWindowServer.h b/Userland/Libraries/LibGUI/ConnectionToWindowServer.h index 98f5b7500d..339d90b959 100644 --- a/Userland/Libraries/LibGUI/ConnectionToWindowServer.h +++ b/Userland/Libraries/LibGUI/ConnectionToWindowServer.h @@ -25,7 +25,7 @@ private: ConnectionToWindowServer(NonnullOwnPtr<Core::Stream::LocalSocket>); virtual void fast_greet(Vector<Gfx::IntRect> const&, u32, u32, u32, Core::AnonymousBuffer const&, DeprecatedString const&, DeprecatedString const&, DeprecatedString const&, Vector<bool> const&, i32) override; - virtual void paint(i32, Gfx::IntSize const&, Vector<Gfx::IntRect> const&) override; + virtual void paint(i32, Gfx::IntSize, Vector<Gfx::IntRect> const&) override; virtual void mouse_move(i32, Gfx::IntPoint, u32, u32, u32, i32, i32, i32, i32, bool, Vector<DeprecatedString> const&) override; virtual void mouse_down(i32, Gfx::IntPoint, u32, u32, u32, i32, i32, i32, i32) override; virtual void mouse_double_click(i32, Gfx::IntPoint, u32, u32, u32, i32, i32, i32, i32) override; diff --git a/Userland/Libraries/LibGUI/Event.h b/Userland/Libraries/LibGUI/Event.h index cdce3a944a..9b64b72b04 100644 --- a/Userland/Libraries/LibGUI/Event.h +++ b/Userland/Libraries/LibGUI/Event.h @@ -143,13 +143,13 @@ private: class WMAppletAreaSizeChangedEvent : public WMEvent { public: - explicit WMAppletAreaSizeChangedEvent(Gfx::IntSize const& size) + explicit WMAppletAreaSizeChangedEvent(Gfx::IntSize size) : WMEvent(Event::Type::WM_AppletAreaSizeChanged, 0, 0) , m_size(size) { } - Gfx::IntSize const& size() const { return m_size; } + Gfx::IntSize size() const { return m_size; } private: Gfx::IntSize m_size; @@ -265,7 +265,7 @@ private: class MultiPaintEvent final : public Event { public: - explicit MultiPaintEvent(Vector<Gfx::IntRect, 32> rects, Gfx::IntSize const& window_size) + explicit MultiPaintEvent(Vector<Gfx::IntRect, 32> rects, Gfx::IntSize window_size) : Event(Event::MultiPaint) , m_rects(move(rects)) , m_window_size(window_size) @@ -273,7 +273,7 @@ public: } Vector<Gfx::IntRect, 32> const& rects() const { return m_rects; } - Gfx::IntSize const& window_size() const { return m_window_size; } + Gfx::IntSize window_size() const { return m_window_size; } private: Vector<Gfx::IntRect, 32> m_rects; @@ -282,7 +282,7 @@ private: class PaintEvent final : public Event { public: - explicit PaintEvent(Gfx::IntRect const& rect, Gfx::IntSize const& window_size = {}) + explicit PaintEvent(Gfx::IntRect const& rect, Gfx::IntSize window_size = {}) : Event(Event::Paint) , m_rect(rect) , m_window_size(window_size) @@ -290,7 +290,7 @@ public: } Gfx::IntRect const& rect() const { return m_rect; } - Gfx::IntSize const& window_size() const { return m_window_size; } + Gfx::IntSize window_size() const { return m_window_size; } private: Gfx::IntRect m_rect; @@ -299,13 +299,13 @@ private: class ResizeEvent final : public Event { public: - explicit ResizeEvent(Gfx::IntSize const& size) + explicit ResizeEvent(Gfx::IntSize size) : Event(Event::Resize) , m_size(size) { } - Gfx::IntSize const& size() const { return m_size; } + Gfx::IntSize size() const { return m_size; } private: Gfx::IntSize m_size; diff --git a/Userland/Libraries/LibGUI/Frame.h b/Userland/Libraries/LibGUI/Frame.h index 91c1f42241..e1be22501b 100644 --- a/Userland/Libraries/LibGUI/Frame.h +++ b/Userland/Libraries/LibGUI/Frame.h @@ -28,7 +28,7 @@ public: Gfx::FrameShape frame_shape() const { return m_shape; } void set_frame_shape(Gfx::FrameShape shape) { m_shape = shape; } - Gfx::IntRect frame_inner_rect_for_size(Gfx::IntSize const& size) const { return { m_thickness, m_thickness, size.width() - m_thickness * 2, size.height() - m_thickness * 2 }; } + Gfx::IntRect frame_inner_rect_for_size(Gfx::IntSize size) const { return { m_thickness, m_thickness, size.width() - m_thickness * 2, size.height() - m_thickness * 2 }; } Gfx::IntRect frame_inner_rect() const { return frame_inner_rect_for_size(size()); } virtual Gfx::IntRect children_clip_rect() const override; diff --git a/Userland/Libraries/LibGUI/TabWidget.cpp b/Userland/Libraries/LibGUI/TabWidget.cpp index 9daaac68d6..3bb1c336d5 100644 --- a/Userland/Libraries/LibGUI/TabWidget.cpp +++ b/Userland/Libraries/LibGUI/TabWidget.cpp @@ -158,7 +158,7 @@ void TabWidget::resize_event(ResizeEvent& event) m_active_widget->set_relative_rect(child_rect_for_size(event.size())); } -Gfx::IntRect TabWidget::child_rect_for_size(Gfx::IntSize const& size) const +Gfx::IntRect TabWidget::child_rect_for_size(Gfx::IntSize size) const { Gfx::IntRect rect; switch (m_tab_position) { diff --git a/Userland/Libraries/LibGUI/TabWidget.h b/Userland/Libraries/LibGUI/TabWidget.h index 9a9ef42189..68505769f2 100644 --- a/Userland/Libraries/LibGUI/TabWidget.h +++ b/Userland/Libraries/LibGUI/TabWidget.h @@ -121,7 +121,7 @@ protected: virtual void doubleclick_event(MouseEvent&) override; private: - Gfx::IntRect child_rect_for_size(Gfx::IntSize const&) const; + Gfx::IntRect child_rect_for_size(Gfx::IntSize) const; Gfx::IntRect button_rect(size_t index) const; Gfx::IntRect vertical_button_rect(size_t index) const; Gfx::IntRect horizontal_button_rect(size_t index) const; diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h index 0c374f877b..4990306919 100644 --- a/Userland/Libraries/LibGUI/Widget.h +++ b/Userland/Libraries/LibGUI/Widget.h @@ -253,7 +253,7 @@ public: void move_to(Gfx::IntPoint point) { set_relative_rect({ point, relative_rect().size() }); } void move_to(int x, int y) { move_to({ x, y }); } - void resize(Gfx::IntSize const& size) { set_relative_rect({ relative_rect().location(), size }); } + void resize(Gfx::IntSize size) { set_relative_rect({ relative_rect().location(), size }); } void resize(int width, int height) { resize({ width, height }); } void move_by(int x, int y) { move_by({ x, y }); } diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp index 86f76209bf..da83186297 100644 --- a/Userland/Libraries/LibGUI/Window.cpp +++ b/Userland/Libraries/LibGUI/Window.cpp @@ -292,7 +292,7 @@ Gfx::IntSize Window::minimum_size() const return ConnectionToWindowServer::the().get_window_minimum_size(m_window_id); } -void Window::set_minimum_size(Gfx::IntSize const& size) +void Window::set_minimum_size(Gfx::IntSize size) { VERIFY(size.width() >= 0 && size.height() >= 0); VERIFY(!is_obeying_widget_min_size()); @@ -918,7 +918,7 @@ void Window::flip(Vector<Gfx::IntRect, 32> const& dirty_rects) m_back_store->bitmap().set_volatile(); } -OwnPtr<WindowBackingStore> Window::create_backing_store(Gfx::IntSize const& size) +OwnPtr<WindowBackingStore> Window::create_backing_store(Gfx::IntSize size) { auto format = m_has_alpha_channel ? Gfx::BitmapFormat::BGRA8888 : Gfx::BitmapFormat::BGRx8888; @@ -1171,7 +1171,7 @@ Action* Window::action_for_shortcut(Shortcut const& shortcut) return Action::find_action_for_shortcut(*this, shortcut); } -void Window::set_base_size(Gfx::IntSize const& base_size) +void Window::set_base_size(Gfx::IntSize base_size) { if (m_base_size == base_size) return; @@ -1180,7 +1180,7 @@ void Window::set_base_size(Gfx::IntSize const& base_size) ConnectionToWindowServer::the().async_set_window_base_size_and_size_increment(m_window_id, m_base_size, m_size_increment); } -void Window::set_size_increment(Gfx::IntSize const& size_increment) +void Window::set_size_increment(Gfx::IntSize size_increment) { if (m_size_increment == size_increment) return; diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h index 48ba6de9d2..03a4bece7c 100644 --- a/Userland/Libraries/LibGUI/Window.h +++ b/Userland/Libraries/LibGUI/Window.h @@ -113,14 +113,14 @@ public: Gfx::IntPoint position() const { return rect().location(); } Gfx::IntSize minimum_size() const; - 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 move_to(int x, int y) { move_to({ x, y }); } void move_to(Gfx::IntPoint point) { set_rect({ point, size() }); } void resize(int width, int height) { resize({ width, height }); } - void resize(Gfx::IntSize const& size) { set_rect({ position(), size }); } + void resize(Gfx::IntSize size) { set_rect({ position(), size }); } void center_on_screen(); void center_within(Window const&); @@ -180,9 +180,9 @@ public: Gfx::Bitmap* back_bitmap(); Gfx::IntSize size_increment() const { return m_size_increment; } - void set_size_increment(Gfx::IntSize const&); + void set_size_increment(Gfx::IntSize); Gfx::IntSize base_size() const { return m_base_size; } - void set_base_size(Gfx::IntSize const&); + void set_base_size(Gfx::IntSize); Optional<Gfx::IntSize> const& resize_aspect_ratio() const { return m_resize_aspect_ratio; } void set_resize_aspect_ratio(int width, int height) { set_resize_aspect_ratio(Gfx::IntSize(width, height)); } void set_no_resize_aspect_ratio() { set_resize_aspect_ratio({}); } @@ -270,7 +270,7 @@ private: void server_did_destroy(); - OwnPtr<WindowBackingStore> create_backing_store(Gfx::IntSize const&); + OwnPtr<WindowBackingStore> create_backing_store(Gfx::IntSize); void set_current_backing_store(WindowBackingStore&, bool flush_immediately = false); void flip(Vector<Gfx::IntRect, 32> const& dirty_rects); void force_update(); diff --git a/Userland/Libraries/LibGfx/AffineTransform.cpp b/Userland/Libraries/LibGfx/AffineTransform.cpp index 61c4ca63d5..8f7ba57452 100644 --- a/Userland/Libraries/LibGfx/AffineTransform.cpp +++ b/Userland/Libraries/LibGfx/AffineTransform.cpp @@ -166,7 +166,7 @@ FloatPoint AffineTransform::map(FloatPoint point) const } template<> -IntSize AffineTransform::map(IntSize const& size) const +IntSize AffineTransform::map(IntSize size) const { return { round_to<int>(static_cast<float>(size.width()) * x_scale()), @@ -175,7 +175,7 @@ IntSize AffineTransform::map(IntSize const& size) const } template<> -FloatSize AffineTransform::map(FloatSize const& size) const +FloatSize AffineTransform::map(FloatSize size) const { return { size.width() * x_scale(), size.height() * y_scale() }; } diff --git a/Userland/Libraries/LibGfx/AffineTransform.h b/Userland/Libraries/LibGfx/AffineTransform.h index a033f922e4..bab97bf63c 100644 --- a/Userland/Libraries/LibGfx/AffineTransform.h +++ b/Userland/Libraries/LibGfx/AffineTransform.h @@ -34,7 +34,7 @@ public: Point<T> map(Point<T>) const; template<Arithmetic T> - Size<T> map(Size<T> const&) const; + Size<T> map(Size<T>) const; template<Arithmetic T> Rect<T> map(Rect<T> const&) const; diff --git a/Userland/Libraries/LibGfx/Bitmap.cpp b/Userland/Libraries/LibGfx/Bitmap.cpp index 9c4896ff2a..6f5b3e8cd6 100644 --- a/Userland/Libraries/LibGfx/Bitmap.cpp +++ b/Userland/Libraries/LibGfx/Bitmap.cpp @@ -52,7 +52,7 @@ size_t Bitmap::minimum_pitch(size_t physical_width, BitmapFormat format) return physical_width * element_size; } -static bool size_would_overflow(BitmapFormat format, IntSize const& size, int scale_factor) +static bool size_would_overflow(BitmapFormat format, IntSize size, int scale_factor) { if (size.width() < 0 || size.height() < 0) return true; @@ -64,13 +64,13 @@ static bool size_would_overflow(BitmapFormat format, IntSize const& size, int sc return Checked<size_t>::multiplication_would_overflow(pitch, size.height() * scale_factor); } -ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create(BitmapFormat format, IntSize const& size, int scale_factor) +ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create(BitmapFormat format, IntSize size, int scale_factor) { auto backing_store = TRY(Bitmap::allocate_backing_store(format, size, scale_factor)); return AK::adopt_nonnull_ref_or_enomem(new (nothrow) Bitmap(format, size, scale_factor, backing_store)); } -ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_shareable(BitmapFormat format, IntSize const& size, int scale_factor) +ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_shareable(BitmapFormat format, IntSize size, int scale_factor) { if (size_would_overflow(format, size, scale_factor)) return Error::from_string_literal("Gfx::Bitmap::try_create_shareable size overflow"); @@ -83,7 +83,7 @@ ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_shareable(BitmapFormat format, return bitmap; } -Bitmap::Bitmap(BitmapFormat format, IntSize const& size, int scale_factor, BackingStore const& backing_store) +Bitmap::Bitmap(BitmapFormat format, IntSize size, int scale_factor, BackingStore const& backing_store) : m_size(size) , m_scale(scale_factor) , m_data(backing_store.data) @@ -98,7 +98,7 @@ Bitmap::Bitmap(BitmapFormat format, IntSize const& size, int scale_factor, Backi m_needs_munmap = true; } -ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_wrapper(BitmapFormat format, IntSize const& size, int scale_factor, size_t pitch, void* data) +ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_wrapper(BitmapFormat format, IntSize size, int scale_factor, size_t pitch, void* data) { if (size_would_overflow(format, size, scale_factor)) return Error::from_string_literal("Gfx::Bitmap::try_create_wrapper size overflow"); @@ -152,7 +152,7 @@ ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_load_from_fd_and_close(int fd, String return Error::from_string_literal("Gfx::Bitmap unable to load from fd"); } -Bitmap::Bitmap(BitmapFormat format, IntSize const& size, int scale_factor, size_t pitch, void* data) +Bitmap::Bitmap(BitmapFormat format, IntSize size, int scale_factor, size_t pitch, void* data) : m_size(size) , m_scale(scale_factor) , m_data(data) @@ -166,7 +166,7 @@ Bitmap::Bitmap(BitmapFormat format, IntSize const& size, int scale_factor, size_ allocate_palette_from_format(format, {}); } -static bool check_size(IntSize const& size, int scale_factor, BitmapFormat format, unsigned actual_size) +static bool check_size(IntSize size, int scale_factor, BitmapFormat format, unsigned actual_size) { // FIXME: Code duplication of size_in_bytes() and m_pitch unsigned expected_size_min = Bitmap::minimum_pitch(size.width() * scale_factor, format) * size.height() * scale_factor; @@ -186,7 +186,7 @@ static bool check_size(IntSize const& size, int scale_factor, BitmapFormat forma return true; } -ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_with_anonymous_buffer(BitmapFormat format, Core::AnonymousBuffer buffer, IntSize const& size, int scale_factor, Vector<ARGB32> const& palette) +ErrorOr<NonnullRefPtr<Bitmap>> Bitmap::try_create_with_anonymous_buffer(BitmapFormat format, Core::AnonymousBuffer buffer, IntSize size, int scale_factor, Vector<ARGB32> const& palette) { if (size_would_overflow(format, size, scale_factor)) return Error::from_string_literal("Gfx::Bitmap::try_create_with_anonymous_buffer size overflow"); @@ -279,7 +279,7 @@ ByteBuffer Bitmap::serialize_to_byte_buffer() const return buffer; } -Bitmap::Bitmap(BitmapFormat format, Core::AnonymousBuffer buffer, IntSize const& size, int scale_factor, Vector<ARGB32> const& palette) +Bitmap::Bitmap(BitmapFormat format, Core::AnonymousBuffer buffer, IntSize size, int scale_factor, Vector<ARGB32> const& palette) : m_size(size) , m_scale(scale_factor) , m_data(buffer.data<void>()) @@ -560,7 +560,7 @@ Gfx::ShareableBitmap Bitmap::to_shareable_bitmap() const return Gfx::ShareableBitmap { bitmap_or_error.release_value_but_fixme_should_propagate_errors(), Gfx::ShareableBitmap::ConstructWithKnownGoodBitmap }; } -ErrorOr<BackingStore> Bitmap::allocate_backing_store(BitmapFormat format, IntSize const& size, int scale_factor) +ErrorOr<BackingStore> Bitmap::allocate_backing_store(BitmapFormat format, IntSize size, int scale_factor) { if (size_would_overflow(format, size, scale_factor)) return Error::from_string_literal("Gfx::Bitmap backing store size overflow"); diff --git a/Userland/Libraries/LibGfx/Bitmap.h b/Userland/Libraries/LibGfx/Bitmap.h index e7ec12c857..c694634ce7 100644 --- a/Userland/Libraries/LibGfx/Bitmap.h +++ b/Userland/Libraries/LibGfx/Bitmap.h @@ -92,12 +92,12 @@ enum RotationDirection { class Bitmap : public RefCounted<Bitmap> { public: - [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create(BitmapFormat, IntSize const&, int intrinsic_scale = 1); - [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create_shareable(BitmapFormat, IntSize const&, int intrinsic_scale = 1); - [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create_wrapper(BitmapFormat, IntSize const&, int intrinsic_scale, size_t pitch, void*); + [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create(BitmapFormat, IntSize, int intrinsic_scale = 1); + [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create_shareable(BitmapFormat, IntSize, int intrinsic_scale = 1); + [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create_wrapper(BitmapFormat, IntSize, int intrinsic_scale, size_t pitch, void*); [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_load_from_file(StringView path, int scale_factor = 1); [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_load_from_fd_and_close(int fd, StringView path); - [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create_with_anonymous_buffer(BitmapFormat, Core::AnonymousBuffer, IntSize const&, int intrinsic_scale, Vector<ARGB32> const& palette); + [[nodiscard]] static ErrorOr<NonnullRefPtr<Bitmap>> try_create_with_anonymous_buffer(BitmapFormat, Core::AnonymousBuffer, IntSize, int intrinsic_scale, Vector<ARGB32> const& palette); static ErrorOr<NonnullRefPtr<Bitmap>> try_create_from_serialized_byte_buffer(ByteBuffer&&); static bool is_path_a_supported_image_format(StringView path) @@ -247,11 +247,11 @@ public: void flood_visit_from_point(Gfx::IntPoint start_point, int threshold, Function<void(Gfx::IntPoint location)> pixel_reached); private: - Bitmap(BitmapFormat, IntSize const&, int, BackingStore const&); - Bitmap(BitmapFormat, IntSize const&, int, size_t pitch, void*); - Bitmap(BitmapFormat, Core::AnonymousBuffer, IntSize const&, int, Vector<ARGB32> const& palette); + Bitmap(BitmapFormat, IntSize, int, BackingStore const&); + Bitmap(BitmapFormat, IntSize, int, size_t pitch, void*); + Bitmap(BitmapFormat, Core::AnonymousBuffer, IntSize, int, Vector<ARGB32> const& palette); - static ErrorOr<BackingStore> allocate_backing_store(BitmapFormat format, IntSize const& size, int scale_factor); + static ErrorOr<BackingStore> allocate_backing_store(BitmapFormat format, IntSize size, int scale_factor); void allocate_palette_from_format(BitmapFormat, Vector<ARGB32> const& source_palette); diff --git a/Userland/Libraries/LibGfx/Painter.cpp b/Userland/Libraries/LibGfx/Painter.cpp index 4e47807026..cd284cb218 100644 --- a/Userland/Libraries/LibGfx/Painter.cpp +++ b/Userland/Libraries/LibGfx/Painter.cpp @@ -175,7 +175,7 @@ void Painter::fill_rect_with_dither_pattern(IntRect const& a_rect, Color color_a } } -void Painter::fill_rect_with_checkerboard(IntRect const& a_rect, IntSize const& cell_size, Color color_dark, Color color_light) +void Painter::fill_rect_with_checkerboard(IntRect const& a_rect, IntSize cell_size, Color color_dark, Color color_light) { VERIFY(scale() == 1); // FIXME: Add scaling support. diff --git a/Userland/Libraries/LibGfx/Painter.h b/Userland/Libraries/LibGfx/Painter.h index 7aaadd38fe..c3e878b3ca 100644 --- a/Userland/Libraries/LibGfx/Painter.h +++ b/Userland/Libraries/LibGfx/Painter.h @@ -46,7 +46,7 @@ public: void clear_rect(IntRect const&, Color); void fill_rect(IntRect const&, Color); void fill_rect_with_dither_pattern(IntRect const&, Color, Color); - void fill_rect_with_checkerboard(IntRect const&, IntSize const&, Color color_dark, Color color_light); + void fill_rect_with_checkerboard(IntRect const&, IntSize, Color color_dark, Color color_light); void fill_rect_with_gradient(Orientation, IntRect const&, Color gradient_start, Color gradient_end); void fill_rect_with_gradient(IntRect const&, Color gradient_start, Color gradient_end); void fill_rect_with_rounded_corners(IntRect const&, Color, int radius); diff --git a/Userland/Libraries/LibSoftGPU/Buffer/FrameBuffer.h b/Userland/Libraries/LibSoftGPU/Buffer/FrameBuffer.h index 7945339fe9..289c80ad78 100644 --- a/Userland/Libraries/LibSoftGPU/Buffer/FrameBuffer.h +++ b/Userland/Libraries/LibSoftGPU/Buffer/FrameBuffer.h @@ -25,7 +25,7 @@ namespace SoftGPU { template<typename C, typename D, typename S> class FrameBuffer final : public RefCounted<FrameBuffer<C, D, S>> { public: - static ErrorOr<NonnullRefPtr<FrameBuffer<C, D, S>>> try_create(Gfx::IntSize const& size) + static ErrorOr<NonnullRefPtr<FrameBuffer<C, D, S>>> try_create(Gfx::IntSize size) { Gfx::IntRect rect = { 0, 0, size.width(), size.height() }; auto color_buffer = TRY(Typed2DBuffer<C>::try_create(size)); diff --git a/Userland/Libraries/LibSoftGPU/Buffer/Typed2DBuffer.h b/Userland/Libraries/LibSoftGPU/Buffer/Typed2DBuffer.h index adaa3cb6c5..96b45fbe4f 100644 --- a/Userland/Libraries/LibSoftGPU/Buffer/Typed2DBuffer.h +++ b/Userland/Libraries/LibSoftGPU/Buffer/Typed2DBuffer.h @@ -23,7 +23,7 @@ namespace SoftGPU { template<typename T> class Typed2DBuffer final : public RefCounted<Typed2DBuffer<T>> { public: - static ErrorOr<NonnullRefPtr<Typed2DBuffer>> try_create(Gfx::IntSize const& size) + static ErrorOr<NonnullRefPtr<Typed2DBuffer>> try_create(Gfx::IntSize size) { auto buffer = TRY(Typed3DBuffer<T>::try_create(size.width(), size.height(), 1)); return adopt_ref(*new Typed2DBuffer(buffer)); diff --git a/Userland/Libraries/LibSoftGPU/Device.cpp b/Userland/Libraries/LibSoftGPU/Device.cpp index 284daabb72..c3085a9328 100644 --- a/Userland/Libraries/LibSoftGPU/Device.cpp +++ b/Userland/Libraries/LibSoftGPU/Device.cpp @@ -821,7 +821,7 @@ void Device::rasterize_triangle(Triangle& triangle) }); } -Device::Device(Gfx::IntSize const& size) +Device::Device(Gfx::IntSize size) : m_frame_buffer(FrameBuffer<GPU::ColorType, GPU::DepthType, GPU::StencilType>::try_create(size).release_value_but_fixme_should_propagate_errors()) { m_options.scissor_box = m_frame_buffer->rect(); @@ -1361,7 +1361,7 @@ ALWAYS_INLINE void Device::shade_fragments(PixelQuad& quad) quad.out_color.set_w(quad.out_color.w() * quad.coverage); } -void Device::resize(Gfx::IntSize const& size) +void Device::resize(Gfx::IntSize size) { auto frame_buffer_or_error = FrameBuffer<GPU::ColorType, GPU::DepthType, GPU::StencilType>::try_create(size); m_frame_buffer = MUST(frame_buffer_or_error); @@ -1711,7 +1711,7 @@ Gfx::IntRect Device::get_rasterization_rect_of_size(Gfx::IntSize size) const extern "C" { -GPU::Device* serenity_gpu_create_device(Gfx::IntSize const& size) +GPU::Device* serenity_gpu_create_device(Gfx::IntSize size) { return make<SoftGPU::Device>(size).leak_ptr(); } diff --git a/Userland/Libraries/LibSoftGPU/Device.h b/Userland/Libraries/LibSoftGPU/Device.h index 31e3dc22ee..c772814d03 100644 --- a/Userland/Libraries/LibSoftGPU/Device.h +++ b/Userland/Libraries/LibSoftGPU/Device.h @@ -43,12 +43,12 @@ struct PixelQuad; class Device final : public GPU::Device { public: - Device(Gfx::IntSize const& min_size); + Device(Gfx::IntSize min_size); virtual GPU::DeviceInfo info() const override; virtual void draw_primitives(GPU::PrimitiveType, FloatMatrix4x4 const& model_view_transform, FloatMatrix4x4 const& projection_transform, Vector<GPU::Vertex>& vertices) override; - virtual void resize(Gfx::IntSize const& min_size) override; + virtual void resize(Gfx::IntSize min_size) override; virtual void clear_color(FloatVector4 const&) override; virtual void clear_depth(GPU::DepthType) override; virtual void clear_stencil(GPU::StencilType) override; diff --git a/Userland/Libraries/LibVT/TerminalWidget.cpp b/Userland/Libraries/LibVT/TerminalWidget.cpp index 901be6533a..f88cb98362 100644 --- a/Userland/Libraries/LibVT/TerminalWidget.cpp +++ b/Userland/Libraries/LibVT/TerminalWidget.cpp @@ -503,7 +503,7 @@ void TerminalWidget::resize_event(GUI::ResizeEvent& event) relayout(event.size()); } -void TerminalWidget::relayout(Gfx::IntSize const& size) +void TerminalWidget::relayout(Gfx::IntSize size) { if (!m_scrollbar) return; diff --git a/Userland/Libraries/LibVT/TerminalWidget.h b/Userland/Libraries/LibVT/TerminalWidget.h index 6a88b50936..1a128d484f 100644 --- a/Userland/Libraries/LibVT/TerminalWidget.h +++ b/Userland/Libraries/LibVT/TerminalWidget.h @@ -85,7 +85,7 @@ public: const StringView color_scheme_name() const { return m_color_scheme_name; } Function<void(StringView)> on_title_change; - Function<void(Gfx::IntSize const&)> on_terminal_size_change; + Function<void(Gfx::IntSize)> on_terminal_size_change; Function<void()> on_command_exit; GUI::Menu& context_menu() { return *m_context_menu; } @@ -148,7 +148,7 @@ private: void update_cursor(); void invalidate_cursor(); - void relayout(Gfx::IntSize const&); + void relayout(Gfx::IntSize); void update_copy_action(); void update_paste_action(); diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp index 4cfcea595c..4c34c88913 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.cpp @@ -345,7 +345,7 @@ void BrowsingContext::set_viewport_rect(Gfx::IntRect const& rect) HTML::main_thread_event_loop().schedule(); } -void BrowsingContext::set_size(Gfx::IntSize const& size) +void BrowsingContext::set_size(Gfx::IntSize size) { if (m_size == size) return; diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h index 441aedc9be..f6de079b7d 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContext.h +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContext.h @@ -134,8 +134,8 @@ public: Page* page() { return m_page; } Page const* page() const { return m_page; } - Gfx::IntSize const& size() const { return m_size; } - void set_size(Gfx::IntSize const&); + Gfx::IntSize size() const { return m_size; } + void set_size(Gfx::IntSize); void set_needs_display(); void set_needs_display(Gfx::IntRect const&); diff --git a/Userland/Libraries/LibWeb/Page/Page.h b/Userland/Libraries/LibWeb/Page/Page.h index 0f73fc66d4..2313089a49 100644 --- a/Userland/Libraries/LibWeb/Page/Page.h +++ b/Userland/Libraries/LibWeb/Page/Page.h @@ -82,8 +82,8 @@ public: Gfx::IntPoint window_position() const { return m_window_position; } void set_window_position(Gfx::IntPoint position) { m_window_position = position; } - Gfx::IntSize const& window_size() const { return m_window_size; } - void set_window_size(Gfx::IntSize const& size) { m_window_size = size; } + Gfx::IntSize window_size() const { return m_window_size; } + void set_window_size(Gfx::IntSize size) { m_window_size = size; } void did_request_alert(DeprecatedString const& message); void alert_closed(); @@ -146,7 +146,7 @@ public: virtual void page_did_request_navigate_back() { } virtual void page_did_request_navigate_forward() { } virtual void page_did_request_refresh() { } - virtual Gfx::IntSize page_did_request_resize_window(Gfx::IntSize const&) { return {}; } + virtual Gfx::IntSize page_did_request_resize_window(Gfx::IntSize) { return {}; } virtual Gfx::IntPoint page_did_request_reposition_window(Gfx::IntPoint) { return {}; } virtual void page_did_request_restore_window() { } virtual Gfx::IntRect page_did_request_maximize_window() { return {}; } diff --git a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp index 93c8bfdfe7..f218a33ce8 100644 --- a/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/BorderPainting.cpp @@ -209,7 +209,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& re } } -RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize const& corners_size) +RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize corners_size) { auto allocate_mask_bitmap = [&]() -> RefPtr<Gfx::Bitmap> { auto bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, corners_size); diff --git a/Userland/Libraries/LibWeb/Painting/BorderPainting.h b/Userland/Libraries/LibWeb/Painting/BorderPainting.h index 921ab4107a..06e9927c30 100644 --- a/Userland/Libraries/LibWeb/Painting/BorderPainting.h +++ b/Userland/Libraries/LibWeb/Painting/BorderPainting.h @@ -71,7 +71,7 @@ struct BordersData { CSS::BorderData left; }; -RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize const& corners_size); +RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize corners_size); void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& rect, BorderRadiiData const& border_radii_data, BordersData const& borders_data); void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiiData const& border_radii_data, BordersData const&); diff --git a/Userland/Libraries/LibWeb/Painting/GradientPainting.cpp b/Userland/Libraries/LibWeb/Painting/GradientPainting.cpp index 4dabc713f9..ea8bfbc9c6 100644 --- a/Userland/Libraries/LibWeb/Painting/GradientPainting.cpp +++ b/Userland/Libraries/LibWeb/Painting/GradientPainting.cpp @@ -20,12 +20,12 @@ static float normalized_gradient_angle_radians(float gradient_angle) return real_angle * (AK::Pi<float> / 180); } -static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float sin_angle, float cos_angle) +static float calulate_gradient_length(Gfx::IntSize gradient_size, float sin_angle, float cos_angle) { return AK::fabs(gradient_size.height() * sin_angle) + AK::fabs(gradient_size.width() * cos_angle); } -static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float gradient_angle) +static float calulate_gradient_length(Gfx::IntSize gradient_size, float gradient_angle) { float angle = normalized_gradient_angle_radians(gradient_angle); float sin_angle, cos_angle; diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp index e66604135f..675ec6cffe 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp @@ -235,7 +235,7 @@ void OutOfProcessWebView::notify_server_did_request_cursor_change(Badge<WebConte set_override_cursor(cursor); } -void OutOfProcessWebView::notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize const& content_size) +void OutOfProcessWebView::notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size) { set_content_size(content_size); } @@ -486,7 +486,7 @@ Gfx::IntPoint OutOfProcessWebView::notify_server_did_request_reposition_window(G return {}; } -Gfx::IntSize OutOfProcessWebView::notify_server_did_request_resize_window(Gfx::IntSize const& size) +Gfx::IntSize OutOfProcessWebView::notify_server_did_request_resize_window(Gfx::IntSize size) { if (on_resize_window) return on_resize_window(size); @@ -653,7 +653,7 @@ void OutOfProcessWebView::set_window_position(Gfx::IntPoint position) client().async_set_window_position(position); } -void OutOfProcessWebView::set_window_size(Gfx::IntSize const& size) +void OutOfProcessWebView::set_window_size(Gfx::IntSize size) { client().async_set_window_size(size); } diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.h b/Userland/Libraries/LibWebView/OutOfProcessWebView.h index 542a7dedfc..2800e98d03 100644 --- a/Userland/Libraries/LibWebView/OutOfProcessWebView.h +++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.h @@ -72,7 +72,7 @@ public: void connect_to_webdriver(DeprecatedString const& webdriver_ipc_path); void set_window_position(Gfx::IntPoint); - void set_window_size(Gfx::IntSize const&); + void set_window_size(Gfx::IntSize); void set_system_visibility_state(bool visible); @@ -107,7 +107,7 @@ public: Function<void(i32 count_waiting)> on_resource_status_change; Function<void()> on_restore_window; Function<Gfx::IntPoint(Gfx::IntPoint)> on_reposition_window; - Function<Gfx::IntSize(Gfx::IntSize const&)> on_resize_window; + Function<Gfx::IntSize(Gfx::IntSize)> on_resize_window; Function<Gfx::IntRect()> on_maximize_window; Function<Gfx::IntRect()> on_minimize_window; Function<Gfx::IntRect()> on_fullscreen_window; @@ -136,7 +136,7 @@ private: virtual void did_scroll() override; // ^WebView::ViewImplementation - virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize const& content_size) override; + virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size) override; virtual void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id) override; virtual void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&) override; virtual void notify_server_did_change_selection(Badge<WebContentClient>) override; @@ -179,7 +179,7 @@ private: virtual void notify_server_did_update_resource_count(i32 count_waiting) override; virtual void notify_server_did_request_restore_window() override; virtual Gfx::IntPoint notify_server_did_request_reposition_window(Gfx::IntPoint) override; - virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize const&) override; + virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize) override; virtual Gfx::IntRect notify_server_did_request_maximize_window() override; virtual Gfx::IntRect notify_server_did_request_minimize_window() override; virtual Gfx::IntRect notify_server_did_request_fullscreen_window() override; diff --git a/Userland/Libraries/LibWebView/ViewImplementation.h b/Userland/Libraries/LibWebView/ViewImplementation.h index 89c0dd9a3a..ba13dc3bab 100644 --- a/Userland/Libraries/LibWebView/ViewImplementation.h +++ b/Userland/Libraries/LibWebView/ViewImplementation.h @@ -18,7 +18,7 @@ class ViewImplementation { public: virtual ~ViewImplementation() { } - virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize const& content_size) = 0; + virtual void notify_server_did_layout(Badge<WebContentClient>, Gfx::IntSize content_size) = 0; virtual void notify_server_did_paint(Badge<WebContentClient>, i32 bitmap_id) = 0; virtual void notify_server_did_invalidate_content_rect(Badge<WebContentClient>, Gfx::IntRect const&) = 0; virtual void notify_server_did_change_selection(Badge<WebContentClient>) = 0; @@ -61,7 +61,7 @@ public: virtual void notify_server_did_update_resource_count(i32 count_waiting) = 0; virtual void notify_server_did_request_restore_window() = 0; virtual Gfx::IntPoint notify_server_did_request_reposition_window(Gfx::IntPoint) = 0; - virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize const&) = 0; + virtual Gfx::IntSize notify_server_did_request_resize_window(Gfx::IntSize) = 0; virtual Gfx::IntRect notify_server_did_request_maximize_window() = 0; virtual Gfx::IntRect notify_server_did_request_minimize_window() = 0; virtual Gfx::IntRect notify_server_did_request_fullscreen_window() = 0; diff --git a/Userland/Libraries/LibWebView/WebContentClient.cpp b/Userland/Libraries/LibWebView/WebContentClient.cpp index fe055fa2d0..7ce11767e8 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.cpp +++ b/Userland/Libraries/LibWebView/WebContentClient.cpp @@ -71,7 +71,7 @@ void WebContentClient::did_request_cursor_change(i32 cursor_type) m_view.notify_server_did_request_cursor_change({}, (Gfx::StandardCursor)cursor_type); } -void WebContentClient::did_layout(Gfx::IntSize const& content_size) +void WebContentClient::did_layout(Gfx::IntSize content_size) { dbgln_if(SPAM_DEBUG, "handle: WebContentClient::DidLayout! content_size={}", content_size); m_view.notify_server_did_layout({}, content_size); @@ -255,7 +255,7 @@ Messages::WebContentClient::DidRequestRepositionWindowResponse WebContentClient: return m_view.notify_server_did_request_reposition_window(position); } -Messages::WebContentClient::DidRequestResizeWindowResponse WebContentClient::did_request_resize_window(Gfx::IntSize const& size) +Messages::WebContentClient::DidRequestResizeWindowResponse WebContentClient::did_request_resize_window(Gfx::IntSize size) { return m_view.notify_server_did_request_resize_window(size); } diff --git a/Userland/Libraries/LibWebView/WebContentClient.h b/Userland/Libraries/LibWebView/WebContentClient.h index 79d0b245bd..2609772f25 100644 --- a/Userland/Libraries/LibWebView/WebContentClient.h +++ b/Userland/Libraries/LibWebView/WebContentClient.h @@ -36,7 +36,7 @@ private: virtual void did_invalidate_content_rect(Gfx::IntRect const&) override; virtual void did_change_selection() override; virtual void did_request_cursor_change(i32) override; - virtual void did_layout(Gfx::IntSize const&) override; + virtual void did_layout(Gfx::IntSize) override; virtual void did_change_title(DeprecatedString const&) override; virtual void did_request_scroll(i32, i32) override; virtual void did_request_scroll_to(Gfx::IntPoint) override; @@ -71,7 +71,7 @@ private: virtual void did_update_resource_count(i32 count_waiting) override; virtual void did_request_restore_window() override; virtual Messages::WebContentClient::DidRequestRepositionWindowResponse did_request_reposition_window(Gfx::IntPoint) override; - virtual Messages::WebContentClient::DidRequestResizeWindowResponse did_request_resize_window(Gfx::IntSize const&) override; + virtual Messages::WebContentClient::DidRequestResizeWindowResponse did_request_resize_window(Gfx::IntSize) override; virtual Messages::WebContentClient::DidRequestMaximizeWindowResponse did_request_maximize_window() override; virtual Messages::WebContentClient::DidRequestMinimizeWindowResponse did_request_minimize_window() override; virtual Messages::WebContentClient::DidRequestFullscreenWindowResponse did_request_fullscreen_window() override; diff --git a/Userland/Services/WebContent/ConnectionFromClient.cpp b/Userland/Services/WebContent/ConnectionFromClient.cpp index f0c14c1668..5774c46f94 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.cpp +++ b/Userland/Services/WebContent/ConnectionFromClient.cpp @@ -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); } diff --git a/Userland/Services/WebContent/ConnectionFromClient.h b/Userland/Services/WebContent/ConnectionFromClient.h index 4b832fa867..fa354309bd 100644 --- a/Userland/Services/WebContent/ConnectionFromClient.h +++ b/Userland/Services/WebContent/ConnectionFromClient.h @@ -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; diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp index bdf76251ff..4bbafade65 100644 --- a/Userland/Services/WebContent/PageHost.cpp +++ b/Userland/Services/WebContent/PageHost.cpp @@ -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); } diff --git a/Userland/Services/WebContent/PageHost.h b/Userland/Services/WebContent/PageHost.h index ac1f5cd31a..7aeca9d20b 100644 --- a/Userland/Services/WebContent/PageHost.h +++ b/Userland/Services/WebContent/PageHost.h @@ -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; diff --git a/Userland/Services/WindowServer/ConnectionFromClient.cpp b/Userland/Services/WindowServer/ConnectionFromClient.cpp index 8d980efc6b..fdb033fe02 100644 --- a/Userland/Services/WindowServer/ConnectionFromClient.cpp +++ b/Userland/Services/WindowServer/ConnectionFromClient.cpp @@ -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(); diff --git a/Userland/Services/WindowServer/ConnectionFromClient.h b/Userland/Services/WindowServer/ConnectionFromClient.h index 3b2dff76be..fa6dde2453 100644 --- a/Userland/Services/WindowServer/ConnectionFromClient.h +++ b/Userland/Services/WindowServer/ConnectionFromClient.h @@ -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; diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp index 378c738cbe..8619863ef7 100644 --- a/Userland/Services/WindowServer/Window.cpp +++ b/Userland/Services/WindowServer/Window.cpp @@ -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) diff --git a/Userland/Services/WindowServer/Window.h b/Userland/Services/WindowServer/Window.h index 43d0816e22..36eb2c5a88 100644 --- a/Userland/Services/WindowServer/Window.h +++ b/Userland/Services/WindowServer/Window.h @@ -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); } diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index 92ada0a8e8..7963a69c91 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -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) diff --git a/Userland/Services/WindowServer/WindowManager.h b/Userland/Services/WindowServer/WindowManager.h index 26378a8d14..2e7b2e1c2b 100644 --- a/Userland/Services/WindowServer/WindowManager.h +++ b/Userland/Services/WindowServer/WindowManager.h @@ -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(); |