summaryrefslogtreecommitdiff
path: root/pugl/pugl.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-09-12 15:22:49 -0400
committerDavid Robillard <d@drobilla.net>2015-09-12 15:22:49 -0400
commit6b4a5a128ef5d87374dfef017cd20e069c068a4b (patch)
tree6c869caad82ef1eb39a4c8bff8b2bad85540436c /pugl/pugl.h
parentae2153511097fc0cc34c0456ebbb13fd4f5c79ec (diff)
Add support for aspect ratio constraints.
Currently only implemented on X11.
Diffstat (limited to 'pugl/pugl.h')
-rw-r--r--pugl/pugl.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h
index 53115ff..3ff66f9 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -171,6 +171,19 @@ PUGL_API void
puglInitWindowMinSize(PuglView* view, int width, int height);
/**
+ Set the window aspect ratio range before creating a window.
+
+ The x and y values here represent a ratio of width to height. To set a
+ fixed aspect ratio, set the minimum and maximum values to the same ratio.
+*/
+PUGL_API void
+puglInitWindowAspectRatio(PuglView* view,
+ int min_x,
+ int min_y,
+ int max_x,
+ int max_y);
+
+/**
Enable or disable resizing before creating a window.
*/
PUGL_API void