mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:47:45 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -14,7 +14,7 @@
|
|||
namespace WindowServer {
|
||||
|
||||
static AppletManager* s_the;
|
||||
Vector<String> order_vector;
|
||||
Vector<DeprecatedString> order_vector;
|
||||
|
||||
AppletManager::AppletManager()
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ Compositor& Compositor::the()
|
|||
return s_the;
|
||||
}
|
||||
|
||||
static WallpaperMode mode_to_enum(String const& name)
|
||||
static WallpaperMode mode_to_enum(DeprecatedString const& name)
|
||||
{
|
||||
if (name == "Tile")
|
||||
return WallpaperMode::Tile;
|
||||
|
@ -779,7 +779,7 @@ void Compositor::start_compose_async_timer()
|
|||
}
|
||||
}
|
||||
|
||||
bool Compositor::set_background_color(String const& background_color)
|
||||
bool Compositor::set_background_color(DeprecatedString const& background_color)
|
||||
{
|
||||
auto color = Color::from_string(background_color);
|
||||
if (!color.has_value())
|
||||
|
@ -799,7 +799,7 @@ bool Compositor::set_background_color(String const& background_color)
|
|||
return succeeded;
|
||||
}
|
||||
|
||||
bool Compositor::set_wallpaper_mode(String const& mode)
|
||||
bool Compositor::set_wallpaper_mode(DeprecatedString const& mode)
|
||||
{
|
||||
auto& wm = WindowManager::the();
|
||||
wm.config()->write_entry("Background", "Mode", mode);
|
||||
|
|
|
@ -105,9 +105,9 @@ public:
|
|||
|
||||
void screen_resolution_changed();
|
||||
|
||||
bool set_background_color(String const& background_color);
|
||||
bool set_background_color(DeprecatedString const& background_color);
|
||||
|
||||
bool set_wallpaper_mode(String const& mode);
|
||||
bool set_wallpaper_mode(DeprecatedString const& mode);
|
||||
|
||||
bool set_wallpaper(RefPtr<Gfx::Bitmap>);
|
||||
RefPtr<Gfx::Bitmap> wallpaper_bitmap() const { return m_wallpaper; }
|
||||
|
|
|
@ -90,7 +90,7 @@ void ConnectionFromClient::notify_about_new_screen_rects()
|
|||
async_screen_rects_changed(Screen::rects(), Screen::main().index(), wm.window_stack_rows(), wm.window_stack_columns());
|
||||
}
|
||||
|
||||
void ConnectionFromClient::create_menu(i32 menu_id, String const& menu_title)
|
||||
void ConnectionFromClient::create_menu(i32 menu_id, DeprecatedString const& menu_title)
|
||||
{
|
||||
auto menu = Menu::construct(this, menu_id, menu_title);
|
||||
m_menus.set(menu_id, move(menu));
|
||||
|
@ -127,8 +127,8 @@ void ConnectionFromClient::add_menu(i32 window_id, i32 menu_id)
|
|||
}
|
||||
|
||||
void ConnectionFromClient::add_menu_item(i32 menu_id, i32 identifier, i32 submenu_id,
|
||||
String const& text, bool enabled, bool checkable, bool checked, bool is_default,
|
||||
String const& shortcut, Gfx::ShareableBitmap const& icon, bool exclusive)
|
||||
DeprecatedString const& text, bool enabled, bool checkable, bool checked, bool is_default,
|
||||
DeprecatedString const& shortcut, Gfx::ShareableBitmap const& icon, bool exclusive)
|
||||
{
|
||||
auto it = m_menus.find(menu_id);
|
||||
if (it == m_menus.end()) {
|
||||
|
@ -172,8 +172,8 @@ void ConnectionFromClient::dismiss_menu(i32 menu_id)
|
|||
}
|
||||
|
||||
void ConnectionFromClient::update_menu_item(i32 menu_id, i32 identifier, [[maybe_unused]] i32 submenu_id,
|
||||
String const& text, bool enabled, bool checkable, bool checked, bool is_default,
|
||||
String const& shortcut, Gfx::ShareableBitmap const& icon)
|
||||
DeprecatedString const& text, bool enabled, bool checkable, bool checked, bool is_default,
|
||||
DeprecatedString const& shortcut, Gfx::ShareableBitmap const& icon)
|
||||
{
|
||||
auto it = m_menus.find(menu_id);
|
||||
if (it == m_menus.end()) {
|
||||
|
@ -315,12 +315,12 @@ Messages::WindowServer::SetWallpaperResponse ConnectionFromClient::set_wallpaper
|
|||
return Compositor::the().set_wallpaper(bitmap.bitmap());
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_background_color(String const& background_color)
|
||||
void ConnectionFromClient::set_background_color(DeprecatedString const& background_color)
|
||||
{
|
||||
Compositor::the().set_background_color(background_color);
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_wallpaper_mode(String const& mode)
|
||||
void ConnectionFromClient::set_wallpaper_mode(DeprecatedString const& mode)
|
||||
{
|
||||
Compositor::the().set_wallpaper_mode(mode);
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ Messages::WindowServer::GetWallpaperResponse ConnectionFromClient::get_wallpaper
|
|||
|
||||
Messages::WindowServer::SetScreenLayoutResponse ConnectionFromClient::set_screen_layout(ScreenLayout const& screen_layout, bool save)
|
||||
{
|
||||
String error_msg;
|
||||
DeprecatedString error_msg;
|
||||
bool success = WindowManager::the().set_screen_layout(ScreenLayout(screen_layout), save, error_msg);
|
||||
return { success, move(error_msg) };
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ Messages::WindowServer::GetScreenLayoutResponse ConnectionFromClient::get_screen
|
|||
|
||||
Messages::WindowServer::SaveScreenLayoutResponse ConnectionFromClient::save_screen_layout()
|
||||
{
|
||||
String error_msg;
|
||||
DeprecatedString error_msg;
|
||||
bool success = WindowManager::the().save_screen_layout(error_msg);
|
||||
return { success, move(error_msg) };
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ void ConnectionFromClient::show_screen_numbers(bool show)
|
|||
Compositor::the().decrement_show_screen_number({});
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_window_title(i32 window_id, String const& title)
|
||||
void ConnectionFromClient::set_window_title(i32 window_id, DeprecatedString const& title)
|
||||
{
|
||||
auto it = m_windows.find(window_id);
|
||||
if (it == m_windows.end()) {
|
||||
|
@ -466,7 +466,7 @@ Messages::WindowServer::SetWindowRectResponse ConnectionFromClient::set_window_r
|
|||
return nullptr;
|
||||
}
|
||||
if (rect.width() > INT16_MAX || rect.height() > INT16_MAX) {
|
||||
did_misbehave(String::formatted("SetWindowRect: Bad window sizing(width={}, height={}), dimension exceeds INT16_MAX", rect.width(), rect.height()).characters());
|
||||
did_misbehave(DeprecatedString::formatted("SetWindowRect: Bad window sizing(width={}, height={}), dimension exceeds INT16_MAX", rect.width(), rect.height()).characters());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ void ConnectionFromClient::create_window(i32 window_id, Gfx::IntRect const& rect
|
|||
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,
|
||||
String const& title, i32 parent_window_id, Gfx::IntRect const& launch_origin_rect)
|
||||
DeprecatedString const& title, i32 parent_window_id, Gfx::IntRect const& launch_origin_rect)
|
||||
{
|
||||
Window* parent_window = nullptr;
|
||||
if (parent_window_id) {
|
||||
|
@ -846,7 +846,7 @@ void ConnectionFromClient::start_window_resize(i32 window_id, i32 resize_directi
|
|||
WindowManager::the().start_window_resize(window, ScreenInput::the().cursor_location(), MouseButton::Primary, (ResizeDirection)resize_direction);
|
||||
}
|
||||
|
||||
Messages::WindowServer::StartDragResponse ConnectionFromClient::start_drag(String const& text, HashMap<String, ByteBuffer> const& mime_data, Gfx::ShareableBitmap const& drag_bitmap)
|
||||
Messages::WindowServer::StartDragResponse ConnectionFromClient::start_drag(DeprecatedString const& text, HashMap<DeprecatedString, ByteBuffer> const& mime_data, Gfx::ShareableBitmap const& drag_bitmap)
|
||||
{
|
||||
auto& wm = WindowManager::the();
|
||||
if (wm.dnd_client() || !(wm.last_processed_buttons() & MouseButton::Primary))
|
||||
|
@ -863,7 +863,7 @@ void ConnectionFromClient::set_accepts_drag(bool accepts)
|
|||
wm.set_accepts_drag(accepts);
|
||||
}
|
||||
|
||||
Messages::WindowServer::SetSystemThemeResponse ConnectionFromClient::set_system_theme(String const& theme_path, String const& theme_name, bool keep_desktop_background)
|
||||
Messages::WindowServer::SetSystemThemeResponse ConnectionFromClient::set_system_theme(DeprecatedString const& theme_path, DeprecatedString const& theme_name, bool keep_desktop_background)
|
||||
{
|
||||
bool success = WindowManager::the().update_theme(theme_path, theme_name, keep_desktop_background);
|
||||
return success;
|
||||
|
@ -897,7 +897,7 @@ Messages::WindowServer::IsSystemThemeOverriddenResponse ConnectionFromClient::is
|
|||
return WindowManager::the().is_theme_overridden();
|
||||
}
|
||||
|
||||
void ConnectionFromClient::apply_cursor_theme(String const& name)
|
||||
void ConnectionFromClient::apply_cursor_theme(DeprecatedString const& name)
|
||||
{
|
||||
WindowManager::the().apply_cursor_theme(name);
|
||||
}
|
||||
|
@ -929,7 +929,7 @@ Messages::WindowServer::GetCursorThemeResponse ConnectionFromClient::get_cursor_
|
|||
return name;
|
||||
}
|
||||
|
||||
Messages::WindowServer::SetSystemFontsResponse ConnectionFromClient::set_system_fonts(String const& default_font_query, String const& fixed_width_font_query, String const& window_title_font_query)
|
||||
Messages::WindowServer::SetSystemFontsResponse ConnectionFromClient::set_system_fonts(DeprecatedString const& default_font_query, DeprecatedString const& fixed_width_font_query, DeprecatedString const& window_title_font_query)
|
||||
{
|
||||
if (!Gfx::FontDatabase::the().get_by_name(default_font_query)
|
||||
|| !Gfx::FontDatabase::the().get_by_name(fixed_width_font_query)) {
|
||||
|
|
|
@ -93,19 +93,19 @@ private:
|
|||
void set_unresponsive(bool);
|
||||
void destroy_window(Window&, Vector<i32>& destroyed_window_ids);
|
||||
|
||||
virtual void create_menu(i32, String const&) override;
|
||||
virtual void create_menu(i32, DeprecatedString const&) override;
|
||||
virtual void destroy_menu(i32) override;
|
||||
virtual void add_menu(i32, i32) override;
|
||||
virtual void add_menu_item(i32, i32, i32, String const&, bool, bool, bool, bool, String const&, Gfx::ShareableBitmap const&, bool) override;
|
||||
virtual void add_menu_item(i32, i32, i32, DeprecatedString const&, bool, bool, bool, bool, DeprecatedString const&, Gfx::ShareableBitmap const&, bool) override;
|
||||
virtual void add_menu_separator(i32) override;
|
||||
virtual void update_menu_item(i32, i32, i32, String const&, bool, bool, bool, bool, String const&, Gfx::ShareableBitmap const&) override;
|
||||
virtual void update_menu_item(i32, i32, i32, DeprecatedString const&, bool, bool, bool, bool, DeprecatedString const&, Gfx::ShareableBitmap const&) override;
|
||||
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&,
|
||||
Optional<Gfx::IntSize> const&, i32, i32, String const&, i32, Gfx::IntRect const&) override;
|
||||
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, String const&) override;
|
||||
virtual void set_window_title(i32, DeprecatedString const&) override;
|
||||
virtual Messages::WindowServer::GetWindowTitleResponse get_window_title(i32) override;
|
||||
virtual Messages::WindowServer::IsMaximizedResponse is_maximized(i32) override;
|
||||
virtual void set_maximized(i32, bool) override;
|
||||
|
@ -129,8 +129,8 @@ private:
|
|||
virtual void set_frameless(i32, bool) override;
|
||||
virtual void set_forced_shadow(i32, bool) override;
|
||||
virtual Messages::WindowServer::SetWallpaperResponse set_wallpaper(Gfx::ShareableBitmap const&) override;
|
||||
virtual void set_background_color(String const&) override;
|
||||
virtual void set_wallpaper_mode(String const&) override;
|
||||
virtual void set_background_color(DeprecatedString const&) override;
|
||||
virtual void set_wallpaper_mode(DeprecatedString const&) override;
|
||||
virtual Messages::WindowServer::GetWallpaperResponse get_wallpaper() override;
|
||||
virtual Messages::WindowServer::SetScreenLayoutResponse set_screen_layout(ScreenLayout const&, bool) override;
|
||||
virtual Messages::WindowServer::GetScreenLayoutResponse get_screen_layout() override;
|
||||
|
@ -143,21 +143,21 @@ private:
|
|||
virtual void popup_menu(i32, Gfx::IntPoint const&, Gfx::IntRect const&) override;
|
||||
virtual void dismiss_menu(i32) override;
|
||||
virtual void set_window_icon_bitmap(i32, Gfx::ShareableBitmap const&) override;
|
||||
virtual Messages::WindowServer::StartDragResponse start_drag(String const&, HashMap<String, ByteBuffer> const&, Gfx::ShareableBitmap const&) override;
|
||||
virtual Messages::WindowServer::StartDragResponse start_drag(DeprecatedString const&, HashMap<DeprecatedString, ByteBuffer> const&, Gfx::ShareableBitmap const&) override;
|
||||
virtual void set_accepts_drag(bool) override;
|
||||
virtual Messages::WindowServer::SetSystemThemeResponse set_system_theme(String const&, String const&, bool keep_desktop_background) override;
|
||||
virtual Messages::WindowServer::SetSystemThemeResponse set_system_theme(DeprecatedString const&, DeprecatedString const&, bool keep_desktop_background) override;
|
||||
virtual Messages::WindowServer::GetSystemThemeResponse get_system_theme() override;
|
||||
virtual Messages::WindowServer::SetSystemThemeOverrideResponse set_system_theme_override(Core::AnonymousBuffer const&) override;
|
||||
virtual Messages::WindowServer::GetSystemThemeOverrideResponse get_system_theme_override() override;
|
||||
virtual void clear_system_theme_override() override;
|
||||
virtual Messages::WindowServer::IsSystemThemeOverriddenResponse is_system_theme_overridden() override;
|
||||
virtual void apply_cursor_theme(String const&) override;
|
||||
virtual void apply_cursor_theme(DeprecatedString const&) override;
|
||||
virtual void set_cursor_highlight_radius(int radius) override;
|
||||
virtual Messages::WindowServer::GetCursorHighlightRadiusResponse get_cursor_highlight_radius() override;
|
||||
virtual void set_cursor_highlight_color(Gfx::Color const& color) override;
|
||||
virtual Messages::WindowServer::GetCursorHighlightColorResponse get_cursor_highlight_color() override;
|
||||
virtual Messages::WindowServer::GetCursorThemeResponse get_cursor_theme() override;
|
||||
virtual Messages::WindowServer::SetSystemFontsResponse set_system_fonts(String const&, String const&, String const&) 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_resize_aspect_ratio(i32, Optional<Gfx::IntSize> const&) override;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <Kernel/API/KeyCode.h>
|
||||
#include <LibCore/Event.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
|
@ -114,7 +114,7 @@ public:
|
|||
int wheel_raw_delta_y() const { return m_wheel_raw_delta_y; }
|
||||
bool is_drag() const { return m_drag; }
|
||||
|
||||
Vector<String> mime_types() const
|
||||
Vector<DeprecatedString> mime_types() const
|
||||
{
|
||||
if (!m_mime_data)
|
||||
return {};
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
namespace WindowServer {
|
||||
|
||||
HardwareScreenBackend::HardwareScreenBackend(String device)
|
||||
HardwareScreenBackend::HardwareScreenBackend(DeprecatedString device)
|
||||
: m_device(move(device))
|
||||
{
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ ErrorOr<void> HardwareScreenBackend::open()
|
|||
|
||||
GraphicsConnectorProperties properties;
|
||||
if (graphics_connector_get_properties(m_display_connector_fd, &properties) < 0)
|
||||
return Error::from_syscall(String::formatted("failed to ioctl {}", m_device), errno);
|
||||
return Error::from_syscall(DeprecatedString::formatted("failed to ioctl {}", m_device), errno);
|
||||
|
||||
m_can_device_flush_buffers = (properties.partial_flushing_support != 0);
|
||||
m_can_device_flush_entire_framebuffer = (properties.flushing_support != 0);
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
#include "ScreenBackend.h"
|
||||
#include "ScreenLayout.h"
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/String.h>
|
||||
#include <sys/ioctl_numbers.h>
|
||||
|
||||
namespace WindowServer {
|
||||
|
@ -18,7 +18,7 @@ class HardwareScreenBackend : public ScreenBackend {
|
|||
public:
|
||||
virtual ~HardwareScreenBackend();
|
||||
|
||||
explicit HardwareScreenBackend(String device);
|
||||
explicit HardwareScreenBackend(DeprecatedString device);
|
||||
|
||||
virtual ErrorOr<void> open() override;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public:
|
|||
virtual ErrorOr<void> set_head_mode_setting(GraphicsHeadModeSetting) override;
|
||||
virtual ErrorOr<GraphicsHeadModeSetting> get_head_mode_setting() override;
|
||||
|
||||
String m_device {};
|
||||
DeprecatedString m_device {};
|
||||
int m_display_connector_fd { -1 };
|
||||
|
||||
Gfx::ARGB32* scanline(int buffer_index, int y) const
|
||||
|
|
|
@ -88,7 +88,7 @@ void KeymapSwitcher::next_keymap()
|
|||
}
|
||||
}
|
||||
|
||||
String KeymapSwitcher::get_current_keymap() const
|
||||
DeprecatedString KeymapSwitcher::get_current_keymap() const
|
||||
{
|
||||
auto proc_keymap = Core::File::construct("/sys/kernel/keymap");
|
||||
if (!proc_keymap->open(Core::OpenMode::ReadOnly))
|
||||
|
@ -100,7 +100,7 @@ String KeymapSwitcher::get_current_keymap() const
|
|||
return keymap_object.get("keymap"sv).to_string();
|
||||
}
|
||||
|
||||
void KeymapSwitcher::set_keymap(const AK::String& keymap)
|
||||
void KeymapSwitcher::set_keymap(const AK::DeprecatedString& keymap)
|
||||
{
|
||||
if (Core::Process::spawn("/bin/keymap"sv, Array { "-m", keymap.characters() }).is_error())
|
||||
dbgln("Failed to call /bin/keymap, error: {} ({})", errno, strerror(errno));
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibCore/FileWatcher.h>
|
||||
|
@ -23,18 +23,18 @@ public:
|
|||
|
||||
void next_keymap();
|
||||
|
||||
Function<void(String const& keymap)> on_keymap_change;
|
||||
Function<void(DeprecatedString const& keymap)> on_keymap_change;
|
||||
|
||||
String get_current_keymap() const;
|
||||
DeprecatedString get_current_keymap() const;
|
||||
|
||||
void set_keymap(AK::String const&);
|
||||
void set_keymap(AK::DeprecatedString const&);
|
||||
|
||||
private:
|
||||
void refresh();
|
||||
|
||||
KeymapSwitcher();
|
||||
|
||||
Vector<AK::String> m_keymaps;
|
||||
Vector<AK::DeprecatedString> m_keymaps;
|
||||
|
||||
RefPtr<Core::FileWatcher> m_file_watcher;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ u32 find_ampersand_shortcut_character(StringView string)
|
|||
return 0;
|
||||
}
|
||||
|
||||
Menu::Menu(ConnectionFromClient* client, int menu_id, String name)
|
||||
Menu::Menu(ConnectionFromClient* client, int menu_id, DeprecatedString name)
|
||||
: Core::Object(client)
|
||||
, m_client(client)
|
||||
, m_menu_id(menu_id)
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibCore/Object.h>
|
||||
#include <LibGfx/Font/Font.h>
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
void update_alt_shortcuts_for_items();
|
||||
void add_item(NonnullOwnPtr<MenuItem>);
|
||||
|
||||
String const& name() const { return m_name; }
|
||||
DeprecatedString const& name() const { return m_name; }
|
||||
|
||||
template<typename Callback>
|
||||
IterationDecision for_each_item(Callback callback)
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
Vector<size_t> const* items_with_alt_shortcut(u32 alt_shortcut) const;
|
||||
|
||||
private:
|
||||
Menu(ConnectionFromClient*, int menu_id, String name);
|
||||
Menu(ConnectionFromClient*, int menu_id, DeprecatedString name);
|
||||
|
||||
virtual void event(Core::Event&) override;
|
||||
|
||||
|
@ -152,7 +152,7 @@ private:
|
|||
|
||||
ConnectionFromClient* m_client { nullptr };
|
||||
int m_menu_id { 0 };
|
||||
String m_name;
|
||||
DeprecatedString m_name;
|
||||
u32 m_alt_shortcut_character { 0 };
|
||||
Gfx::IntRect m_rect_in_window_menubar;
|
||||
Gfx::IntPoint m_unadjusted_position;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
namespace WindowServer {
|
||||
|
||||
MenuItem::MenuItem(Menu& menu, unsigned identifier, String const& text, String const& shortcut_text, bool enabled, bool checkable, bool checked, Gfx::Bitmap const* icon)
|
||||
MenuItem::MenuItem(Menu& menu, unsigned identifier, DeprecatedString const& text, DeprecatedString const& shortcut_text, bool enabled, bool checkable, bool checked, Gfx::Bitmap const* icon)
|
||||
: m_menu(menu)
|
||||
, m_type(Text)
|
||||
, m_enabled(enabled)
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
|
||||
|
@ -23,7 +23,7 @@ public:
|
|||
Separator,
|
||||
};
|
||||
|
||||
MenuItem(Menu&, unsigned identifier, String const& text, String const& shortcut_text = {}, bool enabled = true, bool checkable = false, bool checked = false, Gfx::Bitmap const* icon = nullptr);
|
||||
MenuItem(Menu&, unsigned identifier, DeprecatedString const& text, DeprecatedString const& shortcut_text = {}, bool enabled = true, bool checkable = false, bool checked = false, Gfx::Bitmap const* icon = nullptr);
|
||||
MenuItem(Menu&, Type);
|
||||
~MenuItem() = default;
|
||||
|
||||
|
@ -41,11 +41,11 @@ public:
|
|||
bool is_default() const { return m_default; }
|
||||
void set_default(bool);
|
||||
|
||||
String text() const { return m_text; }
|
||||
void set_text(String text) { m_text = move(text); }
|
||||
DeprecatedString text() const { return m_text; }
|
||||
void set_text(DeprecatedString text) { m_text = move(text); }
|
||||
|
||||
String shortcut_text() const { return m_shortcut_text; }
|
||||
void set_shortcut_text(String text) { m_shortcut_text = move(text); }
|
||||
DeprecatedString shortcut_text() const { return m_shortcut_text; }
|
||||
void set_shortcut_text(DeprecatedString text) { m_shortcut_text = move(text); }
|
||||
|
||||
void set_rect(Gfx::IntRect const& rect) { m_rect = rect; }
|
||||
Gfx::IntRect rect() const;
|
||||
|
@ -73,8 +73,8 @@ private:
|
|||
bool m_checked { false };
|
||||
bool m_default { false };
|
||||
unsigned m_identifier { 0 };
|
||||
String m_text;
|
||||
String m_shortcut_text;
|
||||
DeprecatedString m_text;
|
||||
DeprecatedString m_shortcut_text;
|
||||
Gfx::IntRect m_rect;
|
||||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
int m_submenu_id { -1 };
|
||||
|
|
|
@ -171,7 +171,7 @@ void ScreenNumberOverlay::pick_font()
|
|||
auto screen_number_content_rect_size = calculate_content_rect_for_screen(Screen::main()).size();
|
||||
auto& font_database = Gfx::FontDatabase::the();
|
||||
auto& default_font = WindowManager::the().font();
|
||||
String best_font_name;
|
||||
DeprecatedString best_font_name;
|
||||
int best_font_size = -1;
|
||||
font_database.for_each_font([&](Gfx::Font const& font) {
|
||||
// TODO: instead of picking *any* font we should probably compare font.name()
|
||||
|
@ -213,7 +213,7 @@ Gfx::Font const& ScreenNumberOverlay::font()
|
|||
|
||||
void ScreenNumberOverlay::render_overlay_bitmap(Gfx::Painter& painter)
|
||||
{
|
||||
painter.draw_text({ {}, rect().size() }, String::formatted("{}", m_screen.index() + 1), font(), Gfx::TextAlignment::Center, Color::White);
|
||||
painter.draw_text({ {}, rect().size() }, DeprecatedString::formatted("{}", m_screen.index() + 1), font(), Gfx::TextAlignment::Center, Color::White);
|
||||
}
|
||||
|
||||
Gfx::IntRect ScreenNumberOverlay::calculate_content_rect_for_screen(Screen& screen)
|
||||
|
@ -239,7 +239,7 @@ void WindowGeometryOverlay::update_rect()
|
|||
if (!window->size_increment().is_null()) {
|
||||
int width_steps = (window->width() - window->base_size().width()) / window->size_increment().width();
|
||||
int height_steps = (window->height() - window->base_size().height()) / window->size_increment().height();
|
||||
m_label = String::formatted("{} ({}x{})", window->rect(), width_steps, height_steps);
|
||||
m_label = DeprecatedString::formatted("{} ({}x{})", window->rect(), width_steps, height_steps);
|
||||
} else {
|
||||
m_label = window->rect().to_string();
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ void WindowGeometryOverlay::window_rect_changed()
|
|||
invalidate_content();
|
||||
}
|
||||
|
||||
DndOverlay::DndOverlay(String const& text, Gfx::Bitmap const* bitmap)
|
||||
DndOverlay::DndOverlay(DeprecatedString const& text, Gfx::Bitmap const* bitmap)
|
||||
: m_bitmap(bitmap)
|
||||
, m_text(text)
|
||||
{
|
||||
|
|
|
@ -145,13 +145,13 @@ private:
|
|||
void update_rect();
|
||||
|
||||
WeakPtr<Window> m_window;
|
||||
String m_label;
|
||||
DeprecatedString m_label;
|
||||
Gfx::IntRect m_label_rect;
|
||||
};
|
||||
|
||||
class DndOverlay : public BitmapOverlay {
|
||||
public:
|
||||
DndOverlay(String const&, Gfx::Bitmap const*);
|
||||
DndOverlay(DeprecatedString const&, Gfx::Bitmap const*);
|
||||
|
||||
void cursor_moved()
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ private:
|
|||
void update_rect();
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_bitmap;
|
||||
String m_text;
|
||||
DeprecatedString m_text;
|
||||
Gfx::IntRect m_label_rect;
|
||||
};
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ Screen const& ScreenInput::cursor_location_screen() const
|
|||
return *screen;
|
||||
}
|
||||
|
||||
bool Screen::apply_layout(ScreenLayout&& screen_layout, String& error_msg)
|
||||
bool Screen::apply_layout(ScreenLayout&& screen_layout, DeprecatedString& error_msg)
|
||||
{
|
||||
if (!screen_layout.is_valid(&error_msg))
|
||||
return false;
|
||||
|
@ -145,7 +145,7 @@ bool Screen::apply_layout(ScreenLayout&& screen_layout, String& error_msg)
|
|||
} else {
|
||||
screen = WindowServer::Screen::create(index);
|
||||
if (!screen) {
|
||||
error_msg = String::formatted("Error creating screen #{}", index);
|
||||
error_msg = DeprecatedString::formatted("Error creating screen #{}", index);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ bool Screen::apply_layout(ScreenLayout&& screen_layout, String& error_msg)
|
|||
}
|
||||
|
||||
if (need_to_open_device && !screen->open_device()) {
|
||||
error_msg = String::formatted("Error opening device for screen #{}", index);
|
||||
error_msg = DeprecatedString::formatted("Error opening device for screen #{}", index);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
}
|
||||
~Screen();
|
||||
|
||||
static bool apply_layout(ScreenLayout&&, String&);
|
||||
static bool apply_layout(ScreenLayout&&, DeprecatedString&);
|
||||
static ScreenLayout const& layout() { return s_layout; }
|
||||
|
||||
static Screen& main()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
|
@ -23,7 +23,7 @@ public:
|
|||
Device,
|
||||
Virtual,
|
||||
} mode;
|
||||
Optional<String> device;
|
||||
Optional<DeprecatedString> device;
|
||||
Gfx::IntPoint location;
|
||||
Gfx::IntSize resolution;
|
||||
int scale_factor;
|
||||
|
@ -55,11 +55,11 @@ public:
|
|||
Vector<Screen> screens;
|
||||
unsigned main_screen_index { 0 };
|
||||
|
||||
bool is_valid(String* error_msg = nullptr) const;
|
||||
bool is_valid(DeprecatedString* error_msg = nullptr) const;
|
||||
bool normalize();
|
||||
bool load_config(Core::ConfigFile const& config_file, String* error_msg = nullptr);
|
||||
bool load_config(Core::ConfigFile const& config_file, DeprecatedString* error_msg = nullptr);
|
||||
bool save_config(Core::ConfigFile& config_file, bool sync = true) const;
|
||||
bool try_auto_add_display_connector(String const&);
|
||||
bool try_auto_add_display_connector(DeprecatedString const&);
|
||||
|
||||
// TODO: spaceship operator
|
||||
bool operator!=(ScreenLayout const& other) const;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
namespace WindowServer {
|
||||
|
||||
bool ScreenLayout::is_valid(String* error_msg) const
|
||||
bool ScreenLayout::is_valid(DeprecatedString* error_msg) const
|
||||
{
|
||||
if (screens.is_empty()) {
|
||||
if (error_msg)
|
||||
|
@ -24,7 +24,7 @@ bool ScreenLayout::is_valid(String* error_msg) const
|
|||
}
|
||||
if (main_screen_index >= screens.size()) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Invalid main screen index: {}", main_screen_index);
|
||||
*error_msg = DeprecatedString::formatted("Invalid main screen index: {}", main_screen_index);
|
||||
return false;
|
||||
}
|
||||
int smallest_x = 0;
|
||||
|
@ -33,7 +33,7 @@ bool ScreenLayout::is_valid(String* error_msg) const
|
|||
auto& screen = screens[i];
|
||||
if (screen.mode == Screen::Mode::Device && (screen.device->is_empty() || screen.device->is_null())) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} has no path", i);
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} has no path", i);
|
||||
return false;
|
||||
}
|
||||
for (size_t j = 0; j < screens.size(); j++) {
|
||||
|
@ -42,28 +42,28 @@ bool ScreenLayout::is_valid(String* error_msg) const
|
|||
continue;
|
||||
if (screen.device == other_screen.device) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} is using same device as screen #{}", i, j);
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} is using same device as screen #{}", i, j);
|
||||
return false;
|
||||
}
|
||||
if (screen.virtual_rect().intersects(other_screen.virtual_rect())) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} overlaps with screen #{}", i, j);
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} overlaps with screen #{}", i, j);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (screen.location.x() < 0 || screen.location.y() < 0) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} has invalid location: {}", i, screen.location);
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} has invalid location: {}", i, screen.location);
|
||||
return false;
|
||||
}
|
||||
if (screen.resolution.width() <= 0 || screen.resolution.height() <= 0) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} has invalid resolution: {}", i, screen.resolution);
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} has invalid resolution: {}", i, screen.resolution);
|
||||
return false;
|
||||
}
|
||||
if (screen.scale_factor < 1) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} has invalid scale factor: {}", i, screen.scale_factor);
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} has invalid scale factor: {}", i, screen.scale_factor);
|
||||
return false;
|
||||
}
|
||||
if (i == 0 || screen.location.x() < smallest_x)
|
||||
|
@ -96,7 +96,7 @@ bool ScreenLayout::is_valid(String* error_msg) const
|
|||
auto& screen = screens[i];
|
||||
if (!reachable_screens.contains_slow(&screen)) {
|
||||
if (error_msg)
|
||||
*error_msg = String::formatted("Screen #{} {} cannot be reached from main screen #{} {}", i, screen.virtual_rect(), main_screen_index, screens[main_screen_index].virtual_rect());
|
||||
*error_msg = DeprecatedString::formatted("Screen #{} {} cannot be reached from main screen #{} {}", i, screen.virtual_rect(), main_screen_index, screens[main_screen_index].virtual_rect());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -225,12 +225,12 @@ bool ScreenLayout::normalize()
|
|||
return did_change;
|
||||
}
|
||||
|
||||
bool ScreenLayout::load_config(const Core::ConfigFile& config_file, String* error_msg)
|
||||
bool ScreenLayout::load_config(const Core::ConfigFile& config_file, DeprecatedString* error_msg)
|
||||
{
|
||||
screens.clear_with_capacity();
|
||||
main_screen_index = config_file.read_num_entry("Screens", "MainScreen", 0);
|
||||
for (size_t index = 0;; index++) {
|
||||
auto group_name = String::formatted("Screen{}", index);
|
||||
auto group_name = DeprecatedString::formatted("Screen{}", index);
|
||||
if (!config_file.has_group(group_name))
|
||||
break;
|
||||
auto str_mode = config_file.read_entry(group_name, "Mode");
|
||||
|
@ -242,11 +242,11 @@ bool ScreenLayout::load_config(const Core::ConfigFile& config_file, String* erro
|
|||
}
|
||||
|
||||
if (mode == Screen::Mode::Invalid) {
|
||||
*error_msg = String::formatted("Invalid screen mode '{}'", str_mode);
|
||||
*error_msg = DeprecatedString::formatted("Invalid screen mode '{}'", str_mode);
|
||||
*this = {};
|
||||
return false;
|
||||
}
|
||||
auto device = (mode == Screen::Mode::Device) ? config_file.read_entry(group_name, "Device") : Optional<String> {};
|
||||
auto device = (mode == Screen::Mode::Device) ? config_file.read_entry(group_name, "Device") : Optional<DeprecatedString> {};
|
||||
screens.append({ mode, device,
|
||||
{ config_file.read_num_entry(group_name, "Left"), config_file.read_num_entry(group_name, "Top") },
|
||||
{ config_file.read_num_entry(group_name, "Width"), config_file.read_num_entry(group_name, "Height") },
|
||||
|
@ -266,7 +266,7 @@ bool ScreenLayout::save_config(Core::ConfigFile& config_file, bool sync) const
|
|||
size_t index = 0;
|
||||
while (index < screens.size()) {
|
||||
auto& screen = screens[index];
|
||||
auto group_name = String::formatted("Screen{}", index);
|
||||
auto group_name = DeprecatedString::formatted("Screen{}", index);
|
||||
config_file.write_entry(group_name, "Mode", Screen::mode_to_string(screen.mode));
|
||||
if (screen.mode == Screen::Mode::Device)
|
||||
config_file.write_entry(group_name, "Device", screen.device.value());
|
||||
|
@ -279,7 +279,7 @@ bool ScreenLayout::save_config(Core::ConfigFile& config_file, bool sync) const
|
|||
}
|
||||
// Prune screens no longer in the layout
|
||||
for (;;) {
|
||||
auto group_name = String::formatted("Screen{}", index++);
|
||||
auto group_name = DeprecatedString::formatted("Screen{}", index++);
|
||||
if (!config_file.has_group(group_name))
|
||||
break;
|
||||
config_file.remove_group(group_name);
|
||||
|
@ -305,7 +305,7 @@ bool ScreenLayout::operator!=(const ScreenLayout& other) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ScreenLayout::try_auto_add_display_connector(String const& device_path)
|
||||
bool ScreenLayout::try_auto_add_display_connector(DeprecatedString const& device_path)
|
||||
{
|
||||
int display_connector_fd = open(device_path.characters(), O_RDWR | O_CLOEXEC);
|
||||
if (display_connector_fd < 0) {
|
||||
|
@ -404,7 +404,7 @@ ErrorOr<void> decode(Decoder& decoder, WindowServer::ScreenLayout::Screen& scree
|
|||
{
|
||||
WindowServer::ScreenLayout::Screen::Mode mode;
|
||||
TRY(decoder.decode(mode));
|
||||
Optional<String> device;
|
||||
Optional<DeprecatedString> device;
|
||||
TRY(decoder.decode(device));
|
||||
Gfx::IntPoint location;
|
||||
TRY(decoder.decode(location));
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
#include "ScreenBackend.h"
|
||||
#include "ScreenLayout.h"
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Error.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/String.h>
|
||||
#include <sys/ioctl_numbers.h>
|
||||
|
||||
namespace WindowServer {
|
||||
|
|
|
@ -182,7 +182,7 @@ void WMConnectionFromClient::set_window_taskbar_rect(i32 client_id, i32 window_i
|
|||
window.set_taskbar_rect(rect);
|
||||
}
|
||||
|
||||
void WMConnectionFromClient::set_keymap(String const& keymap)
|
||||
void WMConnectionFromClient::set_keymap(DeprecatedString const& keymap)
|
||||
{
|
||||
WindowManager::the().keymap_switcher()->set_keymap(keymap);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public:
|
|||
virtual void set_event_mask(u32) override;
|
||||
virtual void set_manager_window(i32) override;
|
||||
virtual void set_workspace(u32, u32) override;
|
||||
virtual void set_keymap(String const&) override;
|
||||
virtual void set_keymap(DeprecatedString const&) override;
|
||||
|
||||
unsigned event_mask() const { return m_event_mask; }
|
||||
int window_id() const { return m_window_id; }
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace WindowServer {
|
||||
|
||||
static String default_window_icon_path()
|
||||
static DeprecatedString default_window_icon_path()
|
||||
{
|
||||
return "/res/icons/16x16/window.png";
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ void Window::destroy()
|
|||
set_visible(false);
|
||||
}
|
||||
|
||||
void Window::set_title(String const& title)
|
||||
void Window::set_title(DeprecatedString const& title)
|
||||
{
|
||||
if (m_title == title)
|
||||
return;
|
||||
|
@ -1059,17 +1059,17 @@ void Window::set_modified(bool modified)
|
|||
frame().invalidate_titlebar();
|
||||
}
|
||||
|
||||
String Window::computed_title() const
|
||||
DeprecatedString Window::computed_title() const
|
||||
{
|
||||
String title = m_title.replace("[*]"sv, is_modified() ? " (*)"sv : ""sv, ReplaceMode::FirstOnly);
|
||||
DeprecatedString title = m_title.replace("[*]"sv, is_modified() ? " (*)"sv : ""sv, ReplaceMode::FirstOnly);
|
||||
if (m_title_username.has_value())
|
||||
title = String::formatted("{} [{}]", title, m_title_username.value());
|
||||
title = DeprecatedString::formatted("{} [{}]", title, m_title_username.value());
|
||||
if (client() && client()->is_unresponsive())
|
||||
return String::formatted("{} (Not responding)", title);
|
||||
return DeprecatedString::formatted("{} (Not responding)", title);
|
||||
return title;
|
||||
}
|
||||
|
||||
ErrorOr<Optional<String>> Window::compute_title_username(ConnectionFromClient* client)
|
||||
ErrorOr<Optional<DeprecatedString>> Window::compute_title_username(ConnectionFromClient* client)
|
||||
{
|
||||
if (!client)
|
||||
return Error::from_string_literal("Tried to compute title username without a client");
|
||||
|
@ -1085,7 +1085,7 @@ ErrorOr<Optional<String>> Window::compute_title_username(ConnectionFromClient* c
|
|||
if (!login_session_stat.has_value())
|
||||
return Error::from_string_literal("Failed to find login process stat");
|
||||
if (login_session_stat.value().uid == client_stat.value().uid)
|
||||
return Optional<String> {};
|
||||
return Optional<DeprecatedString> {};
|
||||
return client_stat.value().username;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "HitTestResult.h"
|
||||
#include <AK/String.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <LibCore/Object.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
|
@ -148,10 +148,10 @@ public:
|
|||
bool is_internal() const { return m_client_id == -1; }
|
||||
i32 client_id() const { return m_client_id; }
|
||||
|
||||
String title() const { return m_title; }
|
||||
void set_title(String const&);
|
||||
DeprecatedString title() const { return m_title; }
|
||||
void set_title(DeprecatedString const&);
|
||||
|
||||
String computed_title() const;
|
||||
DeprecatedString computed_title() const;
|
||||
|
||||
float opacity() const { return m_opacity; }
|
||||
void set_opacity(float);
|
||||
|
@ -385,7 +385,7 @@ private:
|
|||
void ensure_window_menu();
|
||||
void update_window_menu_items();
|
||||
void modal_unparented();
|
||||
ErrorOr<Optional<String>> compute_title_username(ConnectionFromClient* client);
|
||||
ErrorOr<Optional<DeprecatedString>> compute_title_username(ConnectionFromClient* client);
|
||||
|
||||
ConnectionFromClient* m_client { nullptr };
|
||||
|
||||
|
@ -394,8 +394,8 @@ private:
|
|||
|
||||
Menubar m_menubar;
|
||||
|
||||
String m_title;
|
||||
Optional<String> m_title_username;
|
||||
DeprecatedString m_title;
|
||||
Optional<DeprecatedString> m_title_username;
|
||||
Gfx::IntRect m_rect;
|
||||
Gfx::IntRect m_saved_nonfullscreen_rect;
|
||||
Gfx::IntRect m_taskbar_rect;
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
endpoint WindowClient
|
||||
{
|
||||
fast_greet(Vector<Gfx::IntRect> screen_rects, u32 main_screen_index, u32 workspace_rows, u32 workspace_columns, Core::AnonymousBuffer theme_buffer, String default_font_query, String fixed_width_font_query, String window_title_font_query, Vector<bool> effects, i32 client_id) =|
|
||||
fast_greet(Vector<Gfx::IntRect> screen_rects, u32 main_screen_index, u32 workspace_rows, u32 workspace_columns, Core::AnonymousBuffer theme_buffer, DeprecatedString default_font_query, DeprecatedString fixed_width_font_query, DeprecatedString window_title_font_query, Vector<bool> effects, i32 client_id) =|
|
||||
|
||||
paint(i32 window_id, Gfx::IntSize window_size, Vector<Gfx::IntRect> rects) =|
|
||||
mouse_move(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta_x, i32 wheel_delta_y, i32 wheel_raw_delta_x, i32 wheel_raw_delta_y, bool is_drag, Vector<String> mime_types) =|
|
||||
mouse_move(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta_x, i32 wheel_delta_y, i32 wheel_raw_delta_x, i32 wheel_raw_delta_y, bool is_drag, Vector<DeprecatedString> mime_types) =|
|
||||
mouse_down(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta_x, i32 wheel_delta_y, i32 wheel_raw_delta_x, i32 wheel_raw_delta_y) =|
|
||||
mouse_double_click(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta_x, i32 wheel_delta_y, i32 wheel_raw_delta_x, i32 wheel_raw_delta_y) =|
|
||||
mouse_up(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta_x, i32 wheel_delta_y, i32 wheel_raw_delta_x, i32 wheel_raw_delta_y) =|
|
||||
|
@ -36,10 +36,10 @@ endpoint WindowClient
|
|||
drag_accepted() =|
|
||||
drag_cancelled() =|
|
||||
|
||||
drag_dropped(i32 window_id, Gfx::IntPoint mouse_position, [UTF8] String text, HashMap<String,ByteBuffer> mime_data) =|
|
||||
drag_dropped(i32 window_id, Gfx::IntPoint mouse_position, [UTF8] DeprecatedString text, HashMap<DeprecatedString,ByteBuffer> mime_data) =|
|
||||
|
||||
update_system_theme(Core::AnonymousBuffer theme_buffer) =|
|
||||
update_system_fonts(String default_font_query, String fixed_width_font_query, String window_title_font_query) =|
|
||||
update_system_fonts(DeprecatedString default_font_query, DeprecatedString fixed_width_font_query, DeprecatedString window_title_font_query) =|
|
||||
update_system_effects(Vector<bool> effects) =|
|
||||
|
||||
display_link_notification() =|
|
||||
|
|
|
@ -54,11 +54,11 @@ static RefPtr<MultiScaleBitmaps> s_inactive_window_shadow;
|
|||
static RefPtr<MultiScaleBitmaps> s_menu_shadow;
|
||||
static RefPtr<MultiScaleBitmaps> s_taskbar_shadow;
|
||||
static RefPtr<MultiScaleBitmaps> s_tooltip_shadow;
|
||||
static String s_last_active_window_shadow_path;
|
||||
static String s_last_inactive_window_shadow_path;
|
||||
static String s_last_menu_shadow_path;
|
||||
static String s_last_taskbar_shadow_path;
|
||||
static String s_last_tooltip_shadow_path;
|
||||
static DeprecatedString s_last_active_window_shadow_path;
|
||||
static DeprecatedString s_last_inactive_window_shadow_path;
|
||||
static DeprecatedString s_last_menu_shadow_path;
|
||||
static DeprecatedString s_last_taskbar_shadow_path;
|
||||
static DeprecatedString s_last_tooltip_shadow_path;
|
||||
|
||||
static Gfx::IntRect frame_rect_for_window(Window& window, Gfx::IntRect const& rect)
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ void WindowFrame::set_button_icons()
|
|||
|
||||
void WindowFrame::reload_config()
|
||||
{
|
||||
String icons_path = WindowManager::the().palette().title_button_icons_path();
|
||||
DeprecatedString icons_path = WindowManager::the().palette().title_button_icons_path();
|
||||
|
||||
auto reload_bitmap = [&](RefPtr<MultiScaleBitmaps>& multiscale_bitmap, StringView path, StringView default_path = ""sv) {
|
||||
StringBuilder full_path;
|
||||
|
@ -177,9 +177,9 @@ void WindowFrame::reload_config()
|
|||
reload_icon(s_close_icon, "window-close"sv, "/res/icons/16x16/window-close.png"sv);
|
||||
reload_icon(s_close_modified_icon, "window-close-modified"sv, "/res/icons/16x16/window-close-modified.png"sv);
|
||||
|
||||
auto load_shadow = [](String const& path, String& last_path, RefPtr<MultiScaleBitmaps>& shadow_bitmap) {
|
||||
auto load_shadow = [](DeprecatedString const& path, DeprecatedString& last_path, RefPtr<MultiScaleBitmaps>& shadow_bitmap) {
|
||||
if (path.is_empty()) {
|
||||
last_path = String::empty();
|
||||
last_path = DeprecatedString::empty();
|
||||
shadow_bitmap = nullptr;
|
||||
} else if (!shadow_bitmap || last_path != path) {
|
||||
if (shadow_bitmap)
|
||||
|
@ -189,7 +189,7 @@ void WindowFrame::reload_config()
|
|||
if (shadow_bitmap)
|
||||
last_path = path;
|
||||
else
|
||||
last_path = String::empty();
|
||||
last_path = DeprecatedString::empty();
|
||||
}
|
||||
};
|
||||
load_shadow(WindowManager::the().palette().active_window_shadow_path(), s_last_active_window_shadow_path, s_active_window_shadow);
|
||||
|
|
|
@ -130,7 +130,7 @@ private:
|
|||
void handle_menu_mouse_event(Menu&, MouseEvent const&);
|
||||
|
||||
Gfx::WindowTheme::WindowState window_state_for_theme() const;
|
||||
String computed_title() const;
|
||||
DeprecatedString computed_title() const;
|
||||
|
||||
Gfx::IntRect constrained_render_rect_to_screen(Gfx::IntRect const&) const;
|
||||
Gfx::IntRect leftmost_titlebar_button_rect() const;
|
||||
|
|
|
@ -54,7 +54,7 @@ WindowManager::WindowManager(Gfx::PaletteImpl const& palette)
|
|||
|
||||
reload_config();
|
||||
|
||||
m_keymap_switcher->on_keymap_change = [&](String const& keymap) {
|
||||
m_keymap_switcher->on_keymap_change = [&](DeprecatedString const& keymap) {
|
||||
for_each_window_manager([&keymap](WMConnectionFromClient& conn) {
|
||||
if (!(conn.event_mask() & WMEventMask::KeymapChanged))
|
||||
return IterationDecision::Continue;
|
||||
|
@ -90,7 +90,7 @@ void WindowManager::reload_config()
|
|||
m_cursor_highlight_color = Color::from_string(m_config->read_entry("Mouse", "CursorHighlightColor")).value_or(default_highlight_color);
|
||||
apply_cursor_theme(m_config->read_entry("Mouse", "CursorTheme", "Default"));
|
||||
|
||||
auto reload_graphic = [&](RefPtr<MultiScaleBitmaps>& bitmap, String const& name) {
|
||||
auto reload_graphic = [&](RefPtr<MultiScaleBitmaps>& bitmap, DeprecatedString const& name) {
|
||||
if (bitmap) {
|
||||
if (!bitmap->load(name))
|
||||
bitmap = nullptr;
|
||||
|
@ -117,7 +117,7 @@ Gfx::Font const& WindowManager::window_title_font() const
|
|||
return Gfx::FontDatabase::window_title_font();
|
||||
}
|
||||
|
||||
bool WindowManager::set_screen_layout(ScreenLayout&& screen_layout, bool save, String& error_msg)
|
||||
bool WindowManager::set_screen_layout(ScreenLayout&& screen_layout, bool save, DeprecatedString& error_msg)
|
||||
{
|
||||
if (!Screen::apply_layout(move(screen_layout), error_msg))
|
||||
return false;
|
||||
|
@ -147,7 +147,7 @@ ScreenLayout WindowManager::get_screen_layout() const
|
|||
return Screen::layout();
|
||||
}
|
||||
|
||||
bool WindowManager::save_screen_layout(String& error_msg)
|
||||
bool WindowManager::save_screen_layout(DeprecatedString& error_msg)
|
||||
{
|
||||
if (!Screen::layout().save_config(*m_config)) {
|
||||
error_msg = "Could not save";
|
||||
|
@ -267,7 +267,7 @@ void WindowManager::set_acceleration_factor(double factor)
|
|||
{
|
||||
ScreenInput::the().set_acceleration_factor(factor);
|
||||
dbgln("Saving acceleration factor {} to config file at {}", factor, m_config->filename());
|
||||
m_config->write_entry("Mouse", "AccelerationFactor", String::formatted("{}", factor));
|
||||
m_config->write_entry("Mouse", "AccelerationFactor", DeprecatedString::formatted("{}", factor));
|
||||
sync_config_to_disk();
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ void WindowManager::set_scroll_step_size(unsigned step_size)
|
|||
{
|
||||
ScreenInput::the().set_scroll_step_size(step_size);
|
||||
dbgln("Saving scroll step size {} to config file at {}", step_size, m_config->filename());
|
||||
m_config->write_entry("Mouse", "ScrollStepSize", String::number(step_size));
|
||||
m_config->write_entry("Mouse", "ScrollStepSize", DeprecatedString::number(step_size));
|
||||
sync_config_to_disk();
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ void WindowManager::set_double_click_speed(int speed)
|
|||
VERIFY(speed >= double_click_speed_min && speed <= double_click_speed_max);
|
||||
m_double_click_speed = speed;
|
||||
dbgln("Saving double-click speed {} to config file at {}", speed, m_config->filename());
|
||||
m_config->write_entry("Input", "DoubleClickSpeed", String::number(speed));
|
||||
m_config->write_entry("Input", "DoubleClickSpeed", DeprecatedString::number(speed));
|
||||
sync_config_to_disk();
|
||||
}
|
||||
|
||||
|
@ -2013,7 +2013,7 @@ Gfx::IntRect WindowManager::tiled_window_rect(Window const& window, WindowTileTy
|
|||
return rect;
|
||||
}
|
||||
|
||||
void WindowManager::start_dnd_drag(ConnectionFromClient& client, String const& text, Gfx::Bitmap const* bitmap, Core::MimeData const& mime_data)
|
||||
void WindowManager::start_dnd_drag(ConnectionFromClient& client, DeprecatedString const& text, Gfx::Bitmap const* bitmap, Core::MimeData const& mime_data)
|
||||
{
|
||||
VERIFY(!m_dnd_client);
|
||||
m_dnd_client = client;
|
||||
|
@ -2062,7 +2062,7 @@ void WindowManager::invalidate_after_theme_or_font_change()
|
|||
Compositor::the().invalidate_after_theme_or_font_change();
|
||||
}
|
||||
|
||||
bool WindowManager::update_theme(String theme_path, String theme_name, bool keep_desktop_background)
|
||||
bool WindowManager::update_theme(DeprecatedString theme_path, DeprecatedString theme_name, bool keep_desktop_background)
|
||||
{
|
||||
auto new_theme = Gfx::load_system_theme(theme_path);
|
||||
if (!new_theme.is_valid())
|
||||
|
@ -2101,7 +2101,7 @@ void WindowManager::clear_theme_override()
|
|||
{
|
||||
m_theme_overridden = false;
|
||||
auto previous_theme_name = m_config->read_entry("Theme", "Name");
|
||||
auto previous_theme = Gfx::load_system_theme(String::formatted("/res/themes/{}.ini", previous_theme_name));
|
||||
auto previous_theme = Gfx::load_system_theme(DeprecatedString::formatted("/res/themes/{}.ini", previous_theme_name));
|
||||
VERIFY(previous_theme.is_valid());
|
||||
Gfx::set_system_theme(previous_theme);
|
||||
m_palette = Gfx::PaletteImpl::create_with_anonymous_buffer(previous_theme);
|
||||
|
@ -2213,9 +2213,9 @@ WindowStack& WindowManager::get_rendering_window_stacks(WindowStack*& transition
|
|||
return Compositor::the().get_rendering_window_stacks(transitioning_window_stack);
|
||||
}
|
||||
|
||||
void WindowManager::apply_cursor_theme(String const& theme_name)
|
||||
void WindowManager::apply_cursor_theme(DeprecatedString const& theme_name)
|
||||
{
|
||||
auto theme_path = String::formatted("/res/cursor-themes/{}/{}", theme_name, "Config.ini");
|
||||
auto theme_path = DeprecatedString::formatted("/res/cursor-themes/{}/{}", theme_name, "Config.ini");
|
||||
auto cursor_theme_config_or_error = Core::ConfigFile::open(theme_path);
|
||||
if (cursor_theme_config_or_error.is_error()) {
|
||||
dbgln("Unable to open cursor theme '{}': {}", theme_path, cursor_theme_config_or_error.error());
|
||||
|
@ -2224,11 +2224,11 @@ void WindowManager::apply_cursor_theme(String const& theme_name)
|
|||
auto cursor_theme_config = cursor_theme_config_or_error.release_value();
|
||||
|
||||
auto* current_cursor = Compositor::the().current_cursor();
|
||||
auto reload_cursor = [&](RefPtr<Cursor>& cursor, String const& name) {
|
||||
auto reload_cursor = [&](RefPtr<Cursor>& cursor, DeprecatedString const& name) {
|
||||
bool is_current_cursor = current_cursor && current_cursor == cursor.ptr();
|
||||
|
||||
static auto const s_default_cursor_path = "/res/cursor-themes/Default/arrow.x2y2.png"sv;
|
||||
cursor = Cursor::create(String::formatted("/res/cursor-themes/{}/{}", theme_name, cursor_theme_config->read_entry("Cursor", name)), s_default_cursor_path);
|
||||
cursor = Cursor::create(DeprecatedString::formatted("/res/cursor-themes/{}/{}", theme_name, cursor_theme_config->read_entry("Cursor", name)), s_default_cursor_path);
|
||||
|
||||
if (is_current_cursor) {
|
||||
Compositor::the().current_cursor_was_reloaded(cursor.ptr());
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
ConnectionFromClient const* dnd_client() const { return m_dnd_client.ptr(); }
|
||||
Core::MimeData const& dnd_mime_data() const { return *m_dnd_mime_data; }
|
||||
|
||||
void start_dnd_drag(ConnectionFromClient&, String const& text, Gfx::Bitmap const*, Core::MimeData const&);
|
||||
void start_dnd_drag(ConnectionFromClient&, DeprecatedString const& text, Gfx::Bitmap const*, Core::MimeData const&);
|
||||
void end_dnd_drag();
|
||||
|
||||
void set_accepts_drag(bool);
|
||||
|
@ -143,9 +143,9 @@ public:
|
|||
Gfx::Font const& font() const;
|
||||
Gfx::Font const& window_title_font() const;
|
||||
|
||||
bool set_screen_layout(ScreenLayout&&, bool, String&);
|
||||
bool set_screen_layout(ScreenLayout&&, bool, DeprecatedString&);
|
||||
ScreenLayout get_screen_layout() const;
|
||||
bool save_screen_layout(String&);
|
||||
bool save_screen_layout(DeprecatedString&);
|
||||
|
||||
void set_acceleration_factor(double);
|
||||
void set_scroll_step_size(unsigned);
|
||||
|
@ -199,7 +199,7 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool update_theme(String theme_path, String theme_name, bool keep_desktop_background);
|
||||
bool update_theme(DeprecatedString theme_path, DeprecatedString theme_name, bool keep_desktop_background);
|
||||
void invalidate_after_theme_or_font_change();
|
||||
|
||||
bool set_theme_override(Core::AnonymousBuffer const& theme_override);
|
||||
|
@ -317,7 +317,7 @@ public:
|
|||
|
||||
MultiScaleBitmaps const* overlay_rect_shadow() const { return m_overlay_rect_shadow.ptr(); }
|
||||
|
||||
void apply_cursor_theme(String const& name);
|
||||
void apply_cursor_theme(DeprecatedString const& name);
|
||||
|
||||
void set_cursor_highlight_radius(int radius);
|
||||
void set_cursor_highlight_color(Gfx::Color const& color);
|
||||
|
@ -472,7 +472,7 @@ private:
|
|||
|
||||
OwnPtr<DndOverlay> m_dnd_overlay;
|
||||
WeakPtr<ConnectionFromClient> m_dnd_client;
|
||||
String m_dnd_text;
|
||||
DeprecatedString m_dnd_text;
|
||||
bool m_dnd_accepts_drag { false };
|
||||
|
||||
RefPtr<Core::MimeData> m_dnd_mime_data;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
endpoint WindowManagerClient
|
||||
{
|
||||
window_removed(i32 wm_id, i32 client_id, i32 window_id) =|
|
||||
window_state_changed(i32 wm_id, i32 client_id, i32 window_id, u32 workspace_row, u32 workspace_column, bool is_active, bool is_blocking, bool is_minimized, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::IntRect rect, Optional<i32> progress) =|
|
||||
window_state_changed(i32 wm_id, i32 client_id, i32 window_id, u32 workspace_row, u32 workspace_column, bool is_active, bool is_blocking, bool is_minimized, bool is_frameless, i32 window_type, [UTF8] DeprecatedString title, Gfx::IntRect rect, Optional<i32> progress) =|
|
||||
window_icon_bitmap_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::ShareableBitmap bitmap) =|
|
||||
window_rect_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
||||
applet_area_size_changed(i32 wm_id, Gfx::IntSize size) =|
|
||||
|
@ -12,5 +12,5 @@ endpoint WindowManagerClient
|
|||
super_d_key_pressed(i32 wm_id) =|
|
||||
super_digit_key_pressed(i32 wm_id, u8 digit) =|
|
||||
workspace_changed(i32 wm_id, u32 row, u32 column) =|
|
||||
keymap_changed(i32 wm_id, [UTF8] String keymap) =|
|
||||
keymap_changed(i32 wm_id, [UTF8] DeprecatedString keymap) =|
|
||||
}
|
||||
|
|
|
@ -13,5 +13,5 @@ endpoint WindowManagerServer
|
|||
set_window_taskbar_rect(i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
||||
set_applet_area_position(Gfx::IntPoint position) =|
|
||||
set_workspace(u32 row, u32 column) =|
|
||||
set_keymap([UTF8] String keymap) =|
|
||||
set_keymap([UTF8] DeprecatedString keymap) =|
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
endpoint WindowServer
|
||||
{
|
||||
create_menu(i32 menu_id, [UTF8] String menu_title) =|
|
||||
create_menu(i32 menu_id, [UTF8] DeprecatedString menu_title) =|
|
||||
destroy_menu(i32 menu_id) =|
|
||||
|
||||
add_menu(i32 window_id, i32 menu_id) =|
|
||||
|
@ -13,12 +13,12 @@ endpoint WindowServer
|
|||
i32 menu_id,
|
||||
i32 identifier,
|
||||
i32 submenu_id,
|
||||
[UTF8] String text,
|
||||
[UTF8] DeprecatedString text,
|
||||
bool enabled,
|
||||
bool checkable,
|
||||
bool checked,
|
||||
bool is_default,
|
||||
[UTF8] String shortcut,
|
||||
[UTF8] DeprecatedString shortcut,
|
||||
Gfx::ShareableBitmap icon,
|
||||
bool exclusive) =|
|
||||
|
||||
|
@ -28,12 +28,12 @@ endpoint WindowServer
|
|||
i32 menu_id,
|
||||
i32 identifier,
|
||||
i32 submenu_id,
|
||||
[UTF8] String text,
|
||||
[UTF8] DeprecatedString text,
|
||||
bool enabled,
|
||||
bool checkable,
|
||||
bool checked,
|
||||
bool is_default,
|
||||
[UTF8] String shortcut,
|
||||
[UTF8] DeprecatedString shortcut,
|
||||
Gfx::ShareableBitmap icon) =|
|
||||
|
||||
remove_menu_item(i32 menu_id, i32 identifier) =|
|
||||
|
@ -58,14 +58,14 @@ endpoint WindowServer
|
|||
Optional<Gfx::IntSize> resize_aspect_ratio,
|
||||
i32 type,
|
||||
i32 mode,
|
||||
[UTF8] String title,
|
||||
[UTF8] DeprecatedString title,
|
||||
i32 parent_window_id,
|
||||
Gfx::IntRect launch_origin_rect) =|
|
||||
|
||||
destroy_window(i32 window_id) => (Vector<i32> destroyed_window_ids)
|
||||
|
||||
set_window_title(i32 window_id, [UTF8] String title) =|
|
||||
get_window_title(i32 window_id) => ([UTF8] String title)
|
||||
set_window_title(i32 window_id, [UTF8] DeprecatedString title) =|
|
||||
get_window_title(i32 window_id) => ([UTF8] DeprecatedString title)
|
||||
|
||||
set_window_progress(i32 window_id, Optional<i32> progress) =|
|
||||
|
||||
|
@ -108,12 +108,12 @@ endpoint WindowServer
|
|||
|
||||
set_wallpaper(Gfx::ShareableBitmap wallpaper_bitmap) => (bool success)
|
||||
|
||||
set_background_color(String background_color) =|
|
||||
set_wallpaper_mode(String mode) =|
|
||||
set_background_color(DeprecatedString background_color) =|
|
||||
set_wallpaper_mode(DeprecatedString mode) =|
|
||||
|
||||
set_screen_layout(::WindowServer::ScreenLayout screen_layout, bool save) => (bool success, String error_msg)
|
||||
set_screen_layout(::WindowServer::ScreenLayout screen_layout, bool save) => (bool success, DeprecatedString error_msg)
|
||||
get_screen_layout() => (::WindowServer::ScreenLayout screen_layout)
|
||||
save_screen_layout() => (bool success, String error_msg)
|
||||
save_screen_layout() => (bool success, DeprecatedString error_msg)
|
||||
show_screen_numbers(bool show) =|
|
||||
|
||||
apply_workspace_settings(u32 rows, u32 columns, bool save) => (bool success)
|
||||
|
@ -125,11 +125,11 @@ endpoint WindowServer
|
|||
set_window_cursor(i32 window_id, i32 cursor_type) =|
|
||||
set_window_custom_cursor(i32 window_id, Gfx::ShareableBitmap cursor) =|
|
||||
|
||||
start_drag([UTF8] String text, HashMap<String,ByteBuffer> mime_data, Gfx::ShareableBitmap drag_bitmap) => (bool started)
|
||||
start_drag([UTF8] DeprecatedString text, HashMap<DeprecatedString,ByteBuffer> mime_data, Gfx::ShareableBitmap drag_bitmap) => (bool started)
|
||||
set_accepts_drag(bool accepts) =|
|
||||
|
||||
set_system_theme(String theme_path, [UTF8] String theme_name, bool keep_desktop_background) => (bool success)
|
||||
get_system_theme() => ([UTF8] String theme_name)
|
||||
set_system_theme(DeprecatedString theme_path, [UTF8] DeprecatedString theme_name, bool keep_desktop_background) => (bool success)
|
||||
get_system_theme() => ([UTF8] DeprecatedString theme_name)
|
||||
refresh_system_theme() =|
|
||||
|
||||
set_system_theme_override(Core::AnonymousBuffer buffer) => (bool success)
|
||||
|
@ -137,8 +137,8 @@ endpoint WindowServer
|
|||
clear_system_theme_override() =|
|
||||
is_system_theme_overridden() => (bool overridden)
|
||||
|
||||
apply_cursor_theme(String name) =|
|
||||
get_cursor_theme() => (String name)
|
||||
apply_cursor_theme(DeprecatedString name) =|
|
||||
get_cursor_theme() => (DeprecatedString name)
|
||||
|
||||
set_cursor_highlight_radius(int radius) =|
|
||||
get_cursor_highlight_radius() => (int radius)
|
||||
|
@ -146,7 +146,7 @@ endpoint WindowServer
|
|||
set_cursor_highlight_color(Gfx::Color color) =|
|
||||
get_cursor_highlight_color() => (Gfx::Color color)
|
||||
|
||||
set_system_fonts(String default_font_query, String fixed_width_font_query, String window_title_font_query) => (bool success)
|
||||
set_system_fonts(DeprecatedString default_font_query, DeprecatedString fixed_width_font_query, DeprecatedString window_title_font_query) => (bool success)
|
||||
set_system_effects(Vector<bool> effects, u8 geometry) =|
|
||||
|
||||
set_window_base_size_and_size_increment(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) =|
|
||||
|
|
|
@ -203,7 +203,7 @@ void WindowSwitcher::draw()
|
|||
painter.blit(icon_rect.location(), window.icon(), window.icon().rect());
|
||||
painter.draw_text(item_rect.translated(thumbnail_width() + 12, 0).translated(1, 1), window.computed_title(), WindowManager::the().window_title_font(), Gfx::TextAlignment::CenterLeft, text_color.inverted());
|
||||
painter.draw_text(item_rect.translated(thumbnail_width() + 12, 0), window.computed_title(), WindowManager::the().window_title_font(), Gfx::TextAlignment::CenterLeft, text_color);
|
||||
auto window_details = m_windows_on_multiple_stacks ? String::formatted("{} on {}:{}", window.rect().to_string(), window.window_stack().row() + 1, window.window_stack().column() + 1) : window.rect().to_string();
|
||||
auto window_details = m_windows_on_multiple_stacks ? DeprecatedString::formatted("{} on {}:{}", window.rect().to_string(), window.window_stack().row() + 1, window.window_stack().column() + 1) : window.rect().to_string();
|
||||
painter.draw_text(item_rect, window_details, Gfx::TextAlignment::CenterRight, rect_text_color);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
auto wm_config = TRY(Core::ConfigFile::open("/etc/WindowServer.ini"));
|
||||
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
|
||||
|
||||
auto theme = Gfx::load_system_theme(String::formatted("/res/themes/{}.ini", theme_name));
|
||||
auto theme = Gfx::load_system_theme(DeprecatedString::formatted("/res/themes/{}.ini", theme_name));
|
||||
VERIFY(theme.is_valid());
|
||||
Gfx::set_system_theme(theme);
|
||||
auto palette = Gfx::PaletteImpl::create_with_anonymous_buffer(theme);
|
||||
|
@ -71,9 +71,9 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
|
||||
// First check which screens are explicitly configured
|
||||
{
|
||||
AK::HashTable<String> fb_devices_configured;
|
||||
AK::HashTable<DeprecatedString> fb_devices_configured;
|
||||
WindowServer::ScreenLayout screen_layout;
|
||||
String error_msg;
|
||||
DeprecatedString error_msg;
|
||||
|
||||
auto add_unconfigured_display_connector_devices = [&]() -> ErrorOr<void> {
|
||||
// Enumerate the /dev/gpu/connectorX devices and try to set up any ones we find that we haven't already used
|
||||
|
@ -82,7 +82,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
auto path = di.next_path();
|
||||
if (!path.starts_with("connector"sv))
|
||||
continue;
|
||||
auto full_path = String::formatted("/dev/gpu/{}", path);
|
||||
auto full_path = DeprecatedString::formatted("/dev/gpu/{}", path);
|
||||
if (!Core::File::is_device(full_path))
|
||||
continue;
|
||||
auto display_connector_fd = TRY(Core::System::open(full_path, O_RDWR | O_CLOEXEC));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue