1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 08:57:35 +00:00

WindowServer: Add a WSCursor class (a bitmap and a hotspot.)

Also import a bunch of cursors I drew. Only the default ("arrow") cursor is
ever used so far.
This commit is contained in:
Andreas Kling 2019-03-31 22:09:10 +02:00
parent 25f28a54a1
commit 2334ffcbf8
13 changed files with 80 additions and 15 deletions

View file

@ -0,0 +1,21 @@
#include <WindowServer/WSCursor.h>
WSCursor::WSCursor(Retained<GraphicsBitmap>&& bitmap, const Point& hotspot)
: m_bitmap(move(bitmap))
, m_hotspot(hotspot)
{
}
WSCursor::~WSCursor()
{
}
Retained<WSCursor> WSCursor::create(Retained<GraphicsBitmap>&& bitmap)
{
return adopt(*new WSCursor(move(bitmap), bitmap->rect().center()));
}
Retained<WSCursor> WSCursor::create(Retained<GraphicsBitmap>&& bitmap, const Point& hotspot)
{
return adopt(*new WSCursor(move(bitmap), hotspot));
}