LibGUI/WindowServer: Implement per-window custom cursors

This commit is contained in:
2025-06-27 14:12:02 +03:00
parent 273e9bbc92
commit cf07b747fe
7 changed files with 110 additions and 19 deletions

View File

@@ -211,6 +211,7 @@ namespace LibGUI
WindowSetMaxSize,
WindowSetFullscreen,
WindowSetTitle,
WindowSetCursor,
DestroyWindowEvent,
CloseWindowEvent,
@@ -297,6 +298,13 @@ namespace LibGUI
BAN::String, title
);
DEFINE_PACKET(
WindowSetCursor,
uint32_t, width,
uint32_t, height,
BAN::Vector<uint32_t>, pixels
);
}
namespace EventPacket

View File

@@ -50,6 +50,7 @@ namespace LibGUI
void set_position(int32_t x, int32_t y);
void set_cursor_visible(bool visible);
void set_cursor(uint32_t width, uint32_t height, BAN::Span<uint32_t> pixels);
Attributes get_attributes() const { return m_attributes; }
void set_attributes(Attributes attributes);