diff options
author | David Robillard <d@drobilla.net> | 2020-05-16 21:18:02 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-05-16 21:18:02 +0200 |
commit | fe96ed3c451548278197e2da74d3d53b1d6a8dd9 (patch) | |
tree | 6c4e3e751ddd13cd4898fac0fae4f4aed7079f36 /pugl/detail/win.c | |
parent | 3200cda25e06887e809fc5b47780aaf950253172 (diff) | |
download | pugl-fe96ed3c451548278197e2da74d3d53b1d6a8dd9.tar.gz pugl-fe96ed3c451548278197e2da74d3d53b1d6a8dd9.tar.bz2 pugl-fe96ed3c451548278197e2da74d3d53b1d6a8dd9.zip |
Add default and maximum size
Diffstat (limited to 'pugl/detail/win.c')
-rw-r--r-- | pugl/detail/win.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pugl/detail/win.c b/pugl/detail/win.c index 76df1b4..22bcfbf 100644 --- a/pugl/detail/win.c +++ b/pugl/detail/win.c @@ -592,6 +592,8 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam) mmi = (MINMAXINFO*)lParam; mmi->ptMinTrackSize.x = view->minWidth; mmi->ptMinTrackSize.y = view->minHeight; + mmi->ptMaxTrackSize.x = view->maxWidth; + mmi->ptMaxTrackSize.y = view->maxHeight; break; case WM_PAINT: GetUpdateRect(view->impl->hwnd, &rect, false); @@ -959,6 +961,14 @@ puglSetFrame(PuglView* view, const PuglRect frame) } PuglStatus +puglSetDefaultSize(PuglView* const view, const int width, const int height) +{ + view->defaultWidth = width; + view->defaultHeight = height; + return PUGL_SUCCESS; +} + +PuglStatus puglSetMinSize(PuglView* const view, const int width, const int height) { view->minWidth = width; @@ -967,6 +977,14 @@ puglSetMinSize(PuglView* const view, const int width, const int height) } PuglStatus +puglSetMaxSize(PuglView* const view, const int width, const int height) +{ + view->maxWidth = width; + view->maxHeight = height; + return PUGL_SUCCESS; +} + +PuglStatus puglSetAspectRatio(PuglView* const view, const int minX, const int minY, |