diff options
Diffstat (limited to 'src/interfaces/cursor.hpp')
-rw-r--r-- | src/interfaces/cursor.hpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/interfaces/cursor.hpp b/src/interfaces/cursor.hpp index 377fe25..b09f06f 100644 --- a/src/interfaces/cursor.hpp +++ b/src/interfaces/cursor.hpp @@ -5,18 +5,21 @@ #include <memory> -enum CursorEvent +enum class CursorStyle { - POSITION_CHANGE + BlinkingBlock = 0, + BlinkingBlockDefault = 1, + SteadyBlock = 2, + BlinkingUnderline = 3, + SteadyUnderline = 4, + BlinkingBar = 5, + SteadyBar = 6 }; // NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) class ICursorController { public: - using Event = CursorEvent; - using Context = Vector2; - virtual ~ICursorController() noexcept = default; virtual void move(const Vector2 &direction, const uint32_t &amount) noexcept = 0; @@ -28,9 +31,18 @@ public: virtual void ensure_position() noexcept = 0; + /** + * Updates the stored cursor position. + * + * This will NOT change the position of the actual cursor! + */ + virtual void update_position(const Vector2 &position) noexcept = 0; + virtual void hide() noexcept = 0; virtual void show() noexcept = 0; + virtual void set_cursor_style(CursorStyle cursor_style) noexcept = 0; + virtual void set_bounds(const Bounds &bounds) noexcept = 0; }; |