diff options
-rw-r--r-- | bindings/cpp/include/pugl/pugl.hpp | 6 | ||||
-rw-r--r-- | examples/pugl_window_demo.c | 4 | ||||
-rw-r--r-- | include/pugl/pugl.h | 18 | ||||
-rw-r--r-- | src/mac.m | 2 | ||||
-rw-r--r-- | src/win.c | 2 | ||||
-rw-r--r-- | src/x11.c | 2 |
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); } /** @@ -1406,7 +1406,7 @@ puglSetAspectRatio(PuglView* const view, } PuglStatus -puglSetTransientFor(PuglView* view, PuglNativeView parent) +puglSetTransientParent(PuglView* view, PuglNativeView parent) { view->transientParent = parent; @@ -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; @@ -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; |