1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-31 18:22:45 +00:00
serenity/Servers/WindowServer/WSCursor.h
Robin Burchell 0dc9af5f7e Add clang-format file
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00

34 lines
847 B
C++

#pragma once
#include <SharedGraphics/GraphicsBitmap.h>
enum class WSStandardCursor
{
None = 0,
Arrow,
IBeam,
ResizeHorizontal,
ResizeVertical,
ResizeDiagonalTLBR,
ResizeDiagonalBLTR,
};
class WSCursor : public Retainable<WSCursor> {
public:
static Retained<WSCursor> create(Retained<GraphicsBitmap>&&, const Point& hotspot);
static Retained<WSCursor> create(Retained<GraphicsBitmap>&&);
static RetainPtr<WSCursor> create(WSStandardCursor);
~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;
};