diff options
-rw-r--r-- | include/pugl/pugl.h | 5 | ||||
-rw-r--r-- | src/implementation.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index 9e65aad..9e2181a 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -1012,6 +1012,11 @@ PUGL_API PuglStatus puglSetParentWindow(PuglView* view, PuglNativeView parent); +/// Return the parent window this view is embedded in, or null +PUGL_API +PuglNativeView +puglGetParentWindow(const PuglView* view); + /** Set the transient parent of the window. diff --git a/src/implementation.c b/src/implementation.c index 9a8ea03..f7b15ff 100644 --- a/src/implementation.c +++ b/src/implementation.c @@ -235,6 +235,12 @@ puglSetParentWindow(PuglView* view, PuglNativeView parent) } PuglNativeView +puglGetParentWindow(const PuglView* const view) +{ + return view->parent; +} + +PuglNativeView puglGetTransientParent(const PuglView* const view) { return view->transientParent; |