summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSCursor.h
blob: 7125ad2a7821a4319096af4bdf68c319ea9078cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
};