From 2e8e543725e7e3b375321b93c0f5a2e684b60911 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 4 Jan 2023 11:02:32 -0500 Subject: Add puglUnrealize() --- include/pugl/pugl.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/pugl') diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index 5a60e80..fda8af2 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -1163,9 +1163,7 @@ puglGetTransientParent(const PuglView* view); Realize a view by creating a corresponding system view or window. After this call, the (initially invisible) underlying system view exists and - can be accessed with puglGetNativeView(). There is currently no - corresponding unrealize function, the system view will be destroyed along - with the view when puglFreeView() is called. + can be accessed with puglGetNativeView(). The view should be fully configured using the above functions before this is called. This function may only be called once per view. @@ -1174,6 +1172,16 @@ PUGL_API PuglStatus puglRealize(PuglView* view); +/** + Unrealize a view by destroying the corresponding system view or window. + + This is the inverse of puglRealize(). After this call, the view no longer + corresponds to a real system view, and can be realized again later. +*/ +PUGL_API +PuglStatus +puglUnrealize(PuglView* view); + /** Show the view. -- cgit v1.2.1