aboutsummaryrefslogtreecommitdiffstats
path: root/bindings/cpp/include/pugl
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-01-21 18:13:15 -0500
committerDavid Robillard <d@drobilla.net>2025-01-21 18:13:22 -0500
commit3c87f1f1fd3b7a58d29e343641d35bb1382cfac8 (patch)
treed092eb192f8724794c10e01d26feaf4235d931a1 /bindings/cpp/include/pugl
parent0452a367a89ac415c647831880485a55eaddbe35 (diff)
downloadpugl-3c87f1f1fd3b7a58d29e343641d35bb1382cfac8.tar.gz
pugl-3c87f1f1fd3b7a58d29e343641d35bb1382cfac8.tar.bz2
pugl-3c87f1f1fd3b7a58d29e343641d35bb1382cfac8.zip
Use a consistent naming scheme for parent functions
These could be combined into a hint-like general get/set mechanism, but currently there's only two window relationships and no immediate plans to add more, so that feels a bit over-engineered. So, just rename for consistency with puglSetTransientParent().
Diffstat (limited to 'bindings/cpp/include/pugl')
-rw-r--r--bindings/cpp/include/pugl/pugl.hpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp
index e374efc..5a97079 100644
--- a/bindings/cpp/include/pugl/pugl.hpp
+++ b/bindings/cpp/include/pugl/pugl.hpp
@@ -558,18 +558,27 @@ public:
@{
*/
- /// @copydoc puglSetParentWindow
- Status setParentWindow(NativeView parent) noexcept
+ /// @copydoc puglSetParent
+ Status setParent(NativeView parent) noexcept
{
- return static_cast<Status>(puglSetParentWindow(cobj(), parent));
+ return static_cast<Status>(puglSetParent(cobj(), parent));
}
+ /// @copydoc puglGetParent
+ NativeView parent() const noexcept { return puglGetParent(cobj()); }
+
/// @copydoc puglSetTransientParent
Status setTransientParent(NativeView parent) noexcept
{
return static_cast<Status>(puglSetTransientParent(cobj(), parent));
}
+ /// @copydoc puglGetTransientParent
+ NativeView transientParent() const noexcept
+ {
+ return puglGetTransientParent(cobj());
+ }
+
/// @copydoc puglRealize
Status realize() noexcept { return static_cast<Status>(puglRealize(cobj())); }