diff options
author | David Robillard <d@drobilla.net> | 2022-06-06 22:41:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-08 22:04:49 -0400 |
commit | 3cc5539d1c85e5044e6f893b3173cd1392bd8fc8 (patch) | |
tree | c0706a7c80a391e86b913ce165ef0f70f3de17f8 /include/pugl/pugl.h | |
parent | 96ca7a5a2ae976c587c676baf87446a55961e507 (diff) | |
download | pugl-3cc5539d1c85e5044e6f893b3173cd1392bd8fc8.tar.gz pugl-3cc5539d1c85e5044e6f893b3173cd1392bd8fc8.tar.bz2 pugl-3cc5539d1c85e5044e6f893b3173cd1392bd8fc8.zip |
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".
Diffstat (limited to 'include/pugl/pugl.h')
-rw-r--r-- | include/pugl/pugl.h | 13 |
1 files changed, 11 insertions, 2 deletions
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 /** |