diff options
author | Jean Pierre Cimalando <jp-dev@inbox.ru> | 2020-06-01 13:03:16 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-13 17:18:26 +0200 |
commit | 2f90b716c29a623b4ec090bb455d2c49b4062f98 (patch) | |
tree | 089d8eee976a0244b56fc103805454aef43ef401 /pugl/pugl.hpp | |
parent | 81f9debf519c4b54e713a7a36a4ac474340d18fb (diff) | |
download | pugl-2f90b716c29a623b4ec090bb455d2c49b4062f98.tar.gz pugl-2f90b716c29a623b4ec090bb455d2c49b4062f98.tar.bz2 pugl-2f90b716c29a623b4ec090bb455d2c49b4062f98.zip |
Add puglSetCursor()
Diffstat (limited to 'pugl/pugl.hpp')
-rw-r--r-- | pugl/pugl.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pugl/pugl.hpp b/pugl/pugl.hpp index 2e18306..f1aef2f 100644 --- a/pugl/pugl.hpp +++ b/pugl/pugl.hpp @@ -357,6 +357,19 @@ static_assert(ViewHint(PUGL_IGNORE_KEY_REPEAT) == ViewHint::ignoreKeyRepeat, using ViewHintValue = PuglViewHintValue; ///< @copydoc PuglViewHintValue +/// @copydoc PuglCursor +enum class Cursor { + arrow, ///< @copydoc PUGL_CURSOR_ARROW + caret, ///< @copydoc PUGL_CURSOR_CARET + crosshair, ///< @copydoc PUGL_CURSOR_CROSSHAIR + hand, ///< @copydoc PUGL_CURSOR_HAND + no, ///< @copydoc PUGL_CURSOR_NO + leftRight, ///< @copydoc PUGL_CURSOR_LEFT_RIGHT + upDown, ///< @copydoc PUGL_CURSOR_UP_DOWN +}; + +static_assert(Cursor(PUGL_CURSOR_UP_DOWN) == Cursor::upDown, ""); + /// @copydoc PuglView class View : public detail::Wrapper<PuglView, puglFreeView> { @@ -514,6 +527,13 @@ public: return static_cast<Status>(puglSetBackend(cobj(), backend)); } + /// @copydoc puglSetCursor + Status setCursor(const Cursor cursor) + { + return static_cast<Status>( + puglSetCursor(cobj(), static_cast<PuglCursor>(cursor))); + } + /// @copydoc puglRequestAttention Status requestAttention() { |