mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:47:34 +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
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 }); }
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue