mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 11:47: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:
parent
25f28a54a1
commit
2334ffcbf8
13 changed files with 80 additions and 15 deletions
21
Servers/WindowServer/WSCursor.cpp
Normal file
21
Servers/WindowServer/WSCursor.cpp
Normal 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));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue