diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/pugl/pugl.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index 79d3969..838450d 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -1245,18 +1245,18 @@ puglSetSizeHint(PuglView* view, */ /** - Set the parent window for embedding a view in an existing window. + Set the parent for embedding a view in an existing window. This must be called before puglRealize(), reparenting is not supported. */ PUGL_API PuglStatus -puglSetParentWindow(PuglView* view, PuglNativeView parent); +puglSetParent(PuglView* view, PuglNativeView parent); /// Return the parent window this view is embedded in, or null PUGL_API PuglNativeView -puglGetParentWindow(const PuglView* view); +puglGetParent(const PuglView* view); /** Set the transient parent of the window. @@ -1927,11 +1927,11 @@ puglInitWindowHint(PuglView* view, PuglViewHint hint, int value) @deprecated Use puglSetWindowParent(). */ -static inline PUGL_DEPRECATED_BY("puglSetParentWindow") +static inline PUGL_DEPRECATED_BY("puglSetParent") void puglInitWindowParent(PuglView* view, PuglNativeView parent) { - puglSetParentWindow(view, parent); + puglSetParent(view, parent); } /** @@ -2178,6 +2178,22 @@ puglRequestAttention(PuglView* view) # define PUGL_KEY_SUPER PUGL_KEY_SUPER_L +/// Set the parent window for embedding a view in an existing window +static inline PUGL_DEPRECATED_BY("puglSetParent") +PuglStatus +puglSetParentWindow(PuglView* view, PuglNativeView parent) +{ + return puglSetParent(view, parent); +} + +/// Return the parent window this view is embedded in, or null +static inline PUGL_DEPRECATED_BY("puglGetParent") +PuglNativeView +puglGetParentWindow(PuglView* view) +{ + return puglGetParent(view); +} + #endif // PUGL_DISABLE_DEPRECATED /** |