aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_internal.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_internal.h
parentae2153511097fc0cc34c0456ebbb13fd4f5c79ec (diff)
downloadpugl-6b4a5a128ef5d87374dfef017cd20e069c068a4b.tar.gz
pugl-6b4a5a128ef5d87374dfef017cd20e069c068a4b.tar.bz2
pugl-6b4a5a128ef5d87374dfef017cd20e069c068a4b.zip
Add support for aspect ratio constraints.
Currently only implemented on X11.
Diffstat (limited to 'pugl/pugl_internal.h')
-rw-r--r--pugl/pugl_internal.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h
index f83f2c7..1006c90 100644
--- a/pugl/pugl_internal.h
+++ b/pugl/pugl_internal.h
@@ -55,6 +55,10 @@ struct PuglViewImpl {
int height;
int min_width;
int min_height;
+ int min_aspect_x;
+ int min_aspect_y;
+ int max_aspect_x;
+ int max_aspect_y;
int mods;
bool mouse_in_view;
bool ignoreKeyRepeat;
@@ -100,6 +104,19 @@ puglInitWindowMinSize(PuglView* view, int width, int height)
}
void
+puglInitWindowAspectRatio(PuglView* view,
+ int min_x,
+ int min_y,
+ int max_x,
+ int max_y)
+{
+ view->min_aspect_x = min_x;
+ view->min_aspect_y = min_y;
+ view->max_aspect_x = max_x;
+ view->max_aspect_y = max_y;
+}
+
+void
puglInitWindowParent(PuglView* view, PuglNativeWindow parent)
{
view->parent = parent;