aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-12-16 20:11:47 -0500
committerDavid Robillard <d@drobilla.net>2021-12-16 20:11:47 -0500
commit7570f3d40a258511fe25f4c239d2f746c97340e0 (patch)
tree424cbf50d1a85086fe9bc56422f0148f38ab844a
parent461e2316ad5315777e494d3a57fd28ac1f73cda5 (diff)
downloadpugl-7570f3d40a258511fe25f4c239d2f746c97340e0.tar.gz
pugl-7570f3d40a258511fe25f4c239d2f746c97340e0.tar.bz2
pugl-7570f3d40a258511fe25f4c239d2f746c97340e0.zip
Rename puglSetTransientFor to puglSetTransientParent
-rw-r--r--bindings/cpp/include/pugl/pugl.hpp6
-rw-r--r--examples/pugl_window_demo.c4
-rw-r--r--include/pugl/pugl.h18
-rw-r--r--src/mac.m2
-rw-r--r--src/win.c2
-rw-r--r--src/x11.c2
6 files changed, 23 insertions, 11 deletions
diff --git a/bindings/cpp/include/pugl/pugl.hpp b/bindings/cpp/include/pugl/pugl.hpp
index 85643ad..397aad0 100644
--- a/bindings/cpp/include/pugl/pugl.hpp
+++ b/bindings/cpp/include/pugl/pugl.hpp
@@ -515,10 +515,10 @@ public:
return static_cast<Status>(puglSetParentWindow(cobj(), parent));
}
- /// @copydoc puglSetTransientFor
- Status setTransientFor(NativeView parent) noexcept
+ /// @copydoc puglSetTransientParent
+ Status setTransientParent(NativeView parent) noexcept
{
- return static_cast<Status>(puglSetTransientFor(cobj(), parent));
+ return static_cast<Status>(puglSetTransientParent(cobj(), parent));
}
/// @copydoc puglRealize
diff --git a/examples/pugl_window_demo.c b/examples/pugl_window_demo.c
index 1e38aa1..34471f0 100644
--- a/examples/pugl_window_demo.c
+++ b/examples/pugl_window_demo.c
@@ -222,8 +222,8 @@ main(int argc, char** argv)
puglSetEventFunc(view, onEvent);
if (i == 1) {
- puglSetTransientFor(app.cubes[1].view,
- puglGetNativeWindow(app.cubes[0].view));
+ puglSetTransientParent(app.cubes[1].view,
+ puglGetNativeWindow(app.cubes[0].view));
}
if ((st = puglRealize(view))) {
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h
index 59b8847..96826a1 100644
--- a/include/pugl/pugl.h
+++ b/include/pugl/pugl.h
@@ -1024,7 +1024,7 @@ puglSetParentWindow(PuglView* view, PuglNativeView parent);
*/
PUGL_API
PuglStatus
-puglSetTransientFor(PuglView* view, PuglNativeView parent);
+puglSetTransientParent(PuglView* view, PuglNativeView parent);
/**
Realize a view by creating a corresponding system view or window.
@@ -1456,11 +1456,23 @@ puglInitWindowAspectRatio(PuglView* view,
On X11, parent must be a Window.
On OSX, parent must be an NSView*.
*/
-static inline PUGL_DEPRECATED_BY("puglSetTransientFor")
+static inline PUGL_DEPRECATED_BY("puglSetTransientParent")
void
puglInitTransientFor(PuglView* view, uintptr_t parent)
{
- puglSetTransientFor(view, (PuglNativeWindow)parent);
+ puglSetTransientParent(view, (PuglNativeWindow)parent);
+}
+
+/**
+ Set transient parent before creating a window.
+
+ @deprecated Use puglSetTransientParent().
+*/
+static inline PUGL_DEPRECATED_BY("puglSetTransientParent")
+PuglStatus
+puglSetTransientFor(PuglView* view, uintptr_t parent)
+{
+ return puglSetTransientParent(view, (PuglNativeWindow)parent);
}
/**
diff --git a/src/mac.m b/src/mac.m
index 840c602..5a10964 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -1406,7 +1406,7 @@ puglSetAspectRatio(PuglView* const view,
}
PuglStatus
-puglSetTransientFor(PuglView* view, PuglNativeView parent)
+puglSetTransientParent(PuglView* view, PuglNativeView parent)
{
view->transientParent = parent;
diff --git a/src/win.c b/src/win.c
index 32232c0..eb1d0d1 100644
--- a/src/win.c
+++ b/src/win.c
@@ -1039,7 +1039,7 @@ puglSetAspectRatio(PuglView* const view,
}
PuglStatus
-puglSetTransientFor(PuglView* view, PuglNativeView parent)
+puglSetTransientParent(PuglView* view, PuglNativeView parent)
{
if (view->parent) {
return PUGL_FAILURE;
diff --git a/src/x11.c b/src/x11.c
index 1c022e6..614b7ac 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -1375,7 +1375,7 @@ puglSetAspectRatio(PuglView* const view,
}
PuglStatus
-puglSetTransientFor(PuglView* const view, const PuglNativeView parent)
+puglSetTransientParent(PuglView* const view, const PuglNativeView parent)
{
Display* display = view->world->impl->display;