1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

Userland: Rename WindowServerConnection=>ConnectionToWindowServer

This was done with CLion's automatic rename feature.
This commit is contained in:
Itamar 2022-02-25 12:39:33 +02:00 committed by Andreas Kling
parent af132fdbd1
commit 935d023967
43 changed files with 201 additions and 201 deletions

View file

@ -15,6 +15,7 @@
#include <LibGUI/Action.h>
#include <LibGUI/Application.h>
#include <LibGUI/ConnectionToWindowMangerServer.h>
#include <LibGUI/ConnectionToWindowServer.h>
#include <LibGUI/Desktop.h>
#include <LibGUI/Event.h>
#include <LibGUI/MenuItem.h>
@ -22,7 +23,6 @@
#include <LibGUI/Painter.h>
#include <LibGUI/Widget.h>
#include <LibGUI/Window.h>
#include <LibGUI/WindowServerConnection.h>
#include <LibGfx/Bitmap.h>
#include <fcntl.h>
#include <stdio.h>
@ -110,7 +110,7 @@ void Window::move_to_front()
if (!is_visible())
return;
WindowServerConnection::the().async_move_window_to_front(m_window_id);
ConnectionToWindowServer::the().async_move_window_to_front(m_window_id);
}
void Window::show()
@ -136,7 +136,7 @@ void Window::show()
unsetenv("__libgui_launch_origin_rect");
}
WindowServerConnection::the().async_create_window(
ConnectionToWindowServer::the().async_create_window(
m_window_id,
m_rect_when_windowless,
!m_moved_by_client,
@ -165,7 +165,7 @@ void Window::show()
m_menubar->for_each_menu([&](Menu& menu) {
menu.realize_menu_if_needed();
WindowServerConnection::the().async_add_menu(m_window_id, menu.menu_id());
ConnectionToWindowServer::the().async_add_menu(m_window_id, menu.menu_id());
return IterationDecision::Continue;
});
@ -205,7 +205,7 @@ void Window::hide()
if (GUI::Application::in_teardown())
return;
auto destroyed_window_ids = WindowServerConnection::the().destroy_window(m_window_id);
auto destroyed_window_ids = ConnectionToWindowServer::the().destroy_window(m_window_id);
server_did_destroy();
for (auto child_window_id : destroyed_window_ids) {
@ -232,27 +232,27 @@ void Window::set_title(String title)
m_title_when_windowless = move(title);
if (!is_visible())
return;
WindowServerConnection::the().async_set_window_title(m_window_id, m_title_when_windowless);
ConnectionToWindowServer::the().async_set_window_title(m_window_id, m_title_when_windowless);
}
String Window::title() const
{
if (!is_visible())
return m_title_when_windowless;
return WindowServerConnection::the().get_window_title(m_window_id);
return ConnectionToWindowServer::the().get_window_title(m_window_id);
}
Gfx::IntRect Window::applet_rect_on_screen() const
{
VERIFY(m_window_type == WindowType::Applet);
return WindowServerConnection::the().get_applet_rect_on_screen(m_window_id);
return ConnectionToWindowServer::the().get_applet_rect_on_screen(m_window_id);
}
Gfx::IntRect Window::rect() const
{
if (!is_visible())
return m_rect_when_windowless;
return WindowServerConnection::the().get_window_rect(m_window_id);
return ConnectionToWindowServer::the().get_window_rect(m_window_id);
}
void Window::set_rect(const Gfx::IntRect& a_rect)
@ -267,7 +267,7 @@ void Window::set_rect(const Gfx::IntRect& a_rect)
m_main_widget->resize(m_rect_when_windowless.size());
return;
}
auto window_rect = WindowServerConnection::the().set_window_rect(m_window_id, a_rect);
auto window_rect = ConnectionToWindowServer::the().set_window_rect(m_window_id, a_rect);
if (m_back_store && m_back_store->size() != window_rect.size())
m_back_store = nullptr;
if (m_front_store && m_front_store->size() != window_rect.size())
@ -281,7 +281,7 @@ Gfx::IntSize Window::minimum_size() const
if (!is_visible())
return m_minimum_size_when_windowless;
return WindowServerConnection::the().get_window_minimum_size(m_window_id);
return ConnectionToWindowServer::the().get_window_minimum_size(m_window_id);
}
void Window::set_minimum_size(const Gfx::IntSize& size)
@ -290,7 +290,7 @@ void Window::set_minimum_size(const Gfx::IntSize& size)
m_minimum_size_when_windowless = size;
if (is_visible())
WindowServerConnection::the().async_set_window_minimum_size(m_window_id, size);
ConnectionToWindowServer::the().async_set_window_minimum_size(m_window_id, size);
}
void Window::center_on_screen()
@ -444,7 +444,7 @@ void Window::handle_multi_paint_event(MultiPaintEvent& event)
set_current_backing_store(*m_back_store, true);
if (is_visible())
WindowServerConnection::the().async_did_finish_painting(m_window_id, rects);
ConnectionToWindowServer::the().async_did_finish_painting(m_window_id, rects);
}
void Window::handle_key_event(KeyEvent& event)
@ -685,7 +685,7 @@ void Window::force_update()
if (!is_visible())
return;
auto rect = this->rect();
WindowServerConnection::the().async_invalidate_rect(m_window_id, { { 0, 0, rect.width(), rect.height() } }, true);
ConnectionToWindowServer::the().async_invalidate_rect(m_window_id, { { 0, 0, rect.width(), rect.height() } }, true);
}
void Window::update(const Gfx::IntRect& a_rect)
@ -705,7 +705,7 @@ void Window::update(const Gfx::IntRect& a_rect)
auto rects = move(m_pending_paint_event_rects);
if (rects.is_empty())
return;
WindowServerConnection::the().async_invalidate_rect(m_window_id, rects, false);
ConnectionToWindowServer::the().async_invalidate_rect(m_window_id, rects, false);
});
}
m_pending_paint_event_rects.append(a_rect);
@ -791,7 +791,7 @@ void Window::set_has_alpha_channel(bool value)
m_back_store = nullptr;
m_front_store = nullptr;
WindowServerConnection::the().async_set_window_has_alpha_channel(m_window_id, value);
ConnectionToWindowServer::the().async_set_window_has_alpha_channel(m_window_id, value);
update();
}
@ -806,7 +806,7 @@ void Window::set_opacity(float opacity)
m_opacity_when_windowless = opacity;
if (!is_visible())
return;
WindowServerConnection::the().async_set_window_opacity(m_window_id, opacity);
ConnectionToWindowServer::the().async_set_window_opacity(m_window_id, opacity);
}
void Window::set_alpha_hit_threshold(float threshold)
@ -820,7 +820,7 @@ void Window::set_alpha_hit_threshold(float threshold)
m_alpha_hit_threshold = threshold;
if (!is_visible())
return;
WindowServerConnection::the().async_set_window_alpha_hit_threshold(m_window_id, threshold);
ConnectionToWindowServer::the().async_set_window_alpha_hit_threshold(m_window_id, threshold);
}
void Window::set_hovered_widget(Widget* widget)
@ -844,7 +844,7 @@ void Window::set_hovered_widget(Widget* widget)
void Window::set_current_backing_store(WindowBackingStore& backing_store, bool flush_immediately)
{
auto& bitmap = backing_store.bitmap();
WindowServerConnection::the().set_window_backing_store(m_window_id, 32, bitmap.pitch(), bitmap.anonymous_buffer().fd(), backing_store.serial(), bitmap.has_alpha_channel(), bitmap.size(), flush_immediately);
ConnectionToWindowServer::the().set_window_backing_store(m_window_id, 32, bitmap.pitch(), bitmap.anonymous_buffer().fd(), backing_store.serial(), bitmap.has_alpha_channel(), bitmap.size(), flush_immediately);
}
void Window::flip(const Vector<Gfx::IntRect, 32>& dirty_rects)
@ -935,12 +935,12 @@ void Window::apply_icon()
if (!is_visible())
return;
WindowServerConnection::the().async_set_window_icon_bitmap(m_window_id, m_icon->to_shareable_bitmap());
ConnectionToWindowServer::the().async_set_window_icon_bitmap(m_window_id, m_icon->to_shareable_bitmap());
}
void Window::start_interactive_resize()
{
WindowServerConnection::the().async_start_window_resize(m_window_id);
ConnectionToWindowServer::the().async_start_window_resize(m_window_id);
}
Vector<Widget&> Window::focusable_widgets(FocusSource source) const
@ -993,7 +993,7 @@ void Window::set_fullscreen(bool fullscreen)
m_fullscreen = fullscreen;
if (!is_visible())
return;
WindowServerConnection::the().async_set_fullscreen(m_window_id, fullscreen);
ConnectionToWindowServer::the().async_set_fullscreen(m_window_id, fullscreen);
}
void Window::set_frameless(bool frameless)
@ -1003,7 +1003,7 @@ void Window::set_frameless(bool frameless)
m_frameless = frameless;
if (!is_visible())
return;
WindowServerConnection::the().async_set_frameless(m_window_id, frameless);
ConnectionToWindowServer::the().async_set_frameless(m_window_id, frameless);
if (!frameless)
apply_icon();
@ -1016,7 +1016,7 @@ void Window::set_forced_shadow(bool shadow)
m_forced_shadow = shadow;
if (!is_visible())
return;
WindowServerConnection::the().async_set_forced_shadow(m_window_id, shadow);
ConnectionToWindowServer::the().async_set_forced_shadow(m_window_id, shadow);
}
bool Window::is_maximized() const
@ -1024,7 +1024,7 @@ bool Window::is_maximized() const
if (!is_visible())
return m_maximized_when_windowless;
return WindowServerConnection::the().is_maximized(m_window_id);
return ConnectionToWindowServer::the().is_maximized(m_window_id);
}
void Window::set_maximized(bool maximized)
@ -1033,7 +1033,7 @@ void Window::set_maximized(bool maximized)
if (!is_visible())
return;
WindowServerConnection::the().async_set_maximized(m_window_id, maximized);
ConnectionToWindowServer::the().async_set_maximized(m_window_id, maximized);
}
void Window::schedule_relayout()
@ -1051,10 +1051,10 @@ void Window::schedule_relayout()
void Window::refresh_system_theme()
{
WindowServerConnection::the().async_refresh_system_theme();
ConnectionToWindowServer::the().async_refresh_system_theme();
}
void Window::for_each_window(Badge<WindowServerConnection>, Function<void(Window&)> callback)
void Window::for_each_window(Badge<ConnectionToWindowServer>, Function<void(Window&)> callback)
{
for (auto& e : *reified_windows) {
VERIFY(e.value);
@ -1062,14 +1062,14 @@ void Window::for_each_window(Badge<WindowServerConnection>, Function<void(Window
}
}
void Window::update_all_windows(Badge<WindowServerConnection>)
void Window::update_all_windows(Badge<ConnectionToWindowServer>)
{
for (auto& e : *reified_windows) {
e.value->force_update();
}
}
void Window::notify_state_changed(Badge<WindowServerConnection>, bool minimized, bool occluded)
void Window::notify_state_changed(Badge<ConnectionToWindowServer>, bool minimized, bool occluded)
{
m_visible_for_timer_purposes = !minimized && !occluded;
@ -1116,7 +1116,7 @@ void Window::set_base_size(const Gfx::IntSize& base_size)
return;
m_base_size = base_size;
if (is_visible())
WindowServerConnection::the().async_set_window_base_size_and_size_increment(m_window_id, m_base_size, m_size_increment);
ConnectionToWindowServer::the().async_set_window_base_size_and_size_increment(m_window_id, m_base_size, m_size_increment);
}
void Window::set_size_increment(const Gfx::IntSize& size_increment)
@ -1125,7 +1125,7 @@ void Window::set_size_increment(const Gfx::IntSize& size_increment)
return;
m_size_increment = size_increment;
if (is_visible())
WindowServerConnection::the().async_set_window_base_size_and_size_increment(m_window_id, m_base_size, m_size_increment);
ConnectionToWindowServer::the().async_set_window_base_size_and_size_increment(m_window_id, m_base_size, m_size_increment);
}
void Window::set_resize_aspect_ratio(const Optional<Gfx::IntSize>& ratio)
@ -1135,7 +1135,7 @@ void Window::set_resize_aspect_ratio(const Optional<Gfx::IntSize>& ratio)
m_resize_aspect_ratio = ratio;
if (is_visible())
WindowServerConnection::the().async_set_window_resize_aspect_ratio(m_window_id, m_resize_aspect_ratio);
ConnectionToWindowServer::the().async_set_window_resize_aspect_ratio(m_window_id, m_resize_aspect_ratio);
}
void Window::did_add_widget(Badge<Widget>, Widget&)
@ -1157,7 +1157,7 @@ void Window::did_remove_widget(Badge<Widget>, Widget& widget)
void Window::set_progress(Optional<int> progress)
{
VERIFY(m_window_id);
WindowServerConnection::the().async_set_window_progress(m_window_id, progress);
ConnectionToWindowServer::the().async_set_window_progress(m_window_id, progress);
}
void Window::update_cursor()
@ -1175,9 +1175,9 @@ void Window::update_cursor()
m_effective_cursor = new_cursor;
if (new_cursor.has<NonnullRefPtr<Gfx::Bitmap>>())
WindowServerConnection::the().async_set_window_custom_cursor(m_window_id, new_cursor.get<NonnullRefPtr<Gfx::Bitmap>>()->to_shareable_bitmap());
ConnectionToWindowServer::the().async_set_window_custom_cursor(m_window_id, new_cursor.get<NonnullRefPtr<Gfx::Bitmap>>()->to_shareable_bitmap());
else
WindowServerConnection::the().async_set_window_cursor(m_window_id, (u32)new_cursor.get<Gfx::StandardCursor>());
ConnectionToWindowServer::the().async_set_window_cursor(m_window_id, (u32)new_cursor.get<Gfx::StandardCursor>());
}
void Window::focus_a_widget_if_possible(FocusSource source)
@ -1208,7 +1208,7 @@ ErrorOr<NonnullRefPtr<Menu>> Window::try_add_menu(String name)
auto menu = TRY(m_menubar->try_add_menu({}, move(name)));
if (m_window_id) {
menu->realize_menu_if_needed();
WindowServerConnection::the().async_add_menu(m_window_id, menu->menu_id());
ConnectionToWindowServer::the().async_add_menu(m_window_id, menu->menu_id());
}
return menu;
}
@ -1225,21 +1225,21 @@ void Window::flash_menubar_menu_for(const MenuItem& menu_item)
if (menu_id < 0)
return;
WindowServerConnection::the().async_flash_menubar_menu(m_window_id, menu_id);
ConnectionToWindowServer::the().async_flash_menubar_menu(m_window_id, menu_id);
}
bool Window::is_modified() const
{
if (!m_window_id)
return false;
return WindowServerConnection::the().is_window_modified(m_window_id);
return ConnectionToWindowServer::the().is_window_modified(m_window_id);
}
void Window::set_modified(bool modified)
{
if (!m_window_id)
return;
WindowServerConnection::the().async_set_window_modified(m_window_id, modified);
ConnectionToWindowServer::the().async_set_window_modified(m_window_id, modified);
}
void Window::flush_pending_paints_immediately()