| 85 | } |
| 86 | |
| 87 | static PuglView* puglNewViewWithParentWindow(PuglWorld* const world, const uintptr_t parentWindowHandle) |
| 88 | { |
| 89 | if (world == nullptr) |
| 90 | return nullptr; |
| 91 | |
| 92 | if (PuglView* const view = puglNewView(world)) |
| 93 | { |
| 94 | puglSetParent(view, parentWindowHandle); |
| 95 | |
| 96 | if (parentWindowHandle != 0) |
| 97 | puglSetPositionHint(view, PUGL_DEFAULT_POSITION, 0, 0); |
| 98 | |
| 99 | return view; |
| 100 | } |
| 101 | |
| 102 | return nullptr; |
| 103 | } |
| 104 | |
| 105 | // ----------------------------------------------------------------------- |
| 106 |