aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/cpp/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-08 01:02:07 -0500
committerDavid Robillard <d@drobilla.net>2023-01-08 01:06:37 -0500
commit92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4 (patch)
treeaa91ae18efac00651f73efef51173edbcc00489f /bindings/cpp/include
parent14b35ef217f5ee387c4f33b1b24bebb015e18f23 (diff)
downloadpugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.tar.gz
pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.tar.bz2
pugl-92b5ab6bdfc8450ed3c4e4e7006cee949386dcd4.zip
Add support for raising windows
Diffstat (limited to 'bindings/cpp/include')
-rw-r--r--bindings/cpp/include/pugl/pugl.hpp17
1 files changed, 16 insertions, 1 deletions
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<Cursor>(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<ShowCommand>(PUGL_SHOW_FORCE_RAISE) ==
+ ShowCommand::forceRaise,
+ "");
+
/// @copydoc PuglView
class View : protected detail::Wrapper<PuglView, puglFreeView>
{
@@ -508,7 +519,11 @@ public:
Status realize() noexcept { return static_cast<Status>(puglRealize(cobj())); }
/// @copydoc puglShow
- Status show() noexcept { return static_cast<Status>(puglShow(cobj())); }
+ Status show(const ShowCommand command) noexcept
+ {
+ return static_cast<Status>(
+ puglShow(cobj(), static_cast<PuglShowCommand>(command)));
+ }
/// @copydoc puglHide
Status hide() noexcept { return static_cast<Status>(puglHide(cobj())); }