From 3cc5539d1c85e5044e6f893b3173cd1392bd8fc8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 6 Jun 2022 22:41:41 -0400 Subject: Use consistent terminology for native views On MacOS in particular, views and windows are entirely different concepts, so confusing them... confuses things. This was the last holdover in the API that used the old "native window". --- include/pugl/pugl.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index dc9c010..397d25e 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -1157,7 +1157,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 puglGetNativeWindow(). There is currently no + 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. @@ -1194,7 +1194,7 @@ puglGetVisible(const PuglView* view); /// Return the native window handle PUGL_API PuglNativeView -puglGetNativeWindow(PuglView* view); +puglGetNativeView(PuglView* view); /** @} @@ -1536,6 +1536,7 @@ typedef PuglLoopLeaveEvent PuglEventLoopLeave; Windows: This is a `HWND`. */ +PUGL_DEPRECATED_BY("PuglNativeView") typedef uintptr_t PuglNativeWindow; /** @@ -1914,6 +1915,14 @@ puglSetAspectRatio(PuglView* view, int minX, int minY, int maxX, int maxY) return st0 ? st0 : st1; } +/// Return the native window handle +static inline PUGL_DEPRECATED_BY("puglGetNativeView") +PuglNativeView +puglGetNativeWindow(PuglView* view) +{ + return puglGetNativeView(view); +} + #endif // PUGL_DISABLE_DEPRECATED /** -- cgit v1.2.1