mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27: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
22
Servers/WindowServer/WSCursor.h
Normal file
22
Servers/WindowServer/WSCursor.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
|
||||
class WSCursor : public Retainable<WSCursor> {
|
||||
public:
|
||||
static Retained<WSCursor> create(Retained<GraphicsBitmap>&&, const Point& hotspot);
|
||||
static Retained<WSCursor> create(Retained<GraphicsBitmap>&&);
|
||||
~WSCursor();
|
||||
|
||||
Point hotspot() const { return m_hotspot; }
|
||||
const GraphicsBitmap& bitmap() const { return *m_bitmap; }
|
||||
|
||||
Rect rect() const { return m_bitmap->rect(); }
|
||||
Size size() const { return m_bitmap->size(); }
|
||||
|
||||
private:
|
||||
WSCursor(Retained<GraphicsBitmap>&&, const Point&);
|
||||
|
||||
RetainPtr<GraphicsBitmap> m_bitmap;
|
||||
Point m_hotspot;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue