summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSWindow.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-13 16:59:55 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-13 16:59:55 +0200
commitc09c114d7700c1177a67c0d3ee6951b2e99d9aa2 (patch)
treec4d5a934ef44e043828a6bd91cd104a78db62387 /Servers/WindowServer/WSWindow.h
parent7a74b767691cbd17a2a615b47e2ab3d75d39c40c (diff)
downloadserenity-c09c114d7700c1177a67c0d3ee6951b2e99d9aa2.zip
WindowServer+LibGUI: Add ability to set per-window icons.
The icons are passed around as filesystem paths for now, since the shared memory bitmaps only support 2 sides.
Diffstat (limited to 'Servers/WindowServer/WSWindow.h')
-rw-r--r--Servers/WindowServer/WSWindow.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Servers/WindowServer/WSWindow.h b/Servers/WindowServer/WSWindow.h
index f4f43668de..7f4461c51c 100644
--- a/Servers/WindowServer/WSWindow.h
+++ b/Servers/WindowServer/WSWindow.h
@@ -113,7 +113,13 @@ public:
void set_base_size(const Size& size) { m_base_size = size; }
const GraphicsBitmap& icon() const { return *m_icon; }
- void set_icon(Retained<GraphicsBitmap>&& icon) { m_icon = move(icon); }
+ String icon_path() const { return m_icon_path; }
+ void set_icon(const String& path, Retained<GraphicsBitmap>&& icon)
+ {
+ m_icon_path = path;
+ m_icon = move(icon);
+ }
+ void set_default_icon();
const WSCursor* override_cursor() const { return m_override_cursor.ptr(); }
void set_override_cursor(RetainPtr<WSCursor>&& cursor) { m_override_cursor = move(cursor); }
@@ -146,6 +152,7 @@ private:
Size m_size_increment;
Size m_base_size;
Retained<GraphicsBitmap> m_icon;
+ String m_icon_path;
RetainPtr<WSCursor> m_override_cursor;
WSWindowFrame m_frame;
Color m_background_color { Color::LightGray };