From 92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 8 Jan 2023 01:02:07 -0500 Subject: Add support for raising windows --- bindings/cpp/include/pugl/pugl.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'bindings/cpp/include') diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp index 0ce7df7..5f939d5 100644 --- a/bindings/cpp/include/pugl/pugl.hpp +++ b/bindings/cpp/include/pugl/pugl.hpp @@ -378,6 +378,17 @@ enum class Cursor { static_assert(static_cast(PUGL_CURSOR_UP_DOWN) == Cursor::upDown, ""); +/// @copydoc PuglShowCommand +enum class ShowCommand { + passive, ///< @copydoc PUGL_SHOW_PASSIVE, + raise, ///< @copydoc PUGL_SHOW_RAISE, + forceRaise, ///< @copydoc PUGL_SHOW_FORCE_RAISE, +}; + +static_assert(static_cast(PUGL_SHOW_FORCE_RAISE) == + ShowCommand::forceRaise, + ""); + /// @copydoc PuglView class View : protected detail::Wrapper { @@ -508,7 +519,11 @@ public: Status realize() noexcept { return static_cast(puglRealize(cobj())); } /// @copydoc puglShow - Status show() noexcept { return static_cast(puglShow(cobj())); } + Status show(const ShowCommand command) noexcept + { + return static_cast( + puglShow(cobj(), static_cast(command))); + } /// @copydoc puglHide Status hide() noexcept { return static_cast(puglHide(cobj())); } -- cgit v1.2.1