lib/android: add ANativeWindow::set_buffers_geometry
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 19 Apr 2015 13:34:46 +0000 (09:34 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sat, 12 Sep 2015 16:36:06 +0000 (12:36 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/android/native_app_glue.nit

index 2202827..d99f5a9 100644 (file)
@@ -368,4 +368,13 @@ end
 
 # Android NDK's structure to control the native window for drawing
 extern class ANativeWindow `{ ANativeWindow* `}
+       # Change the format and size of the window buffers
+       #
+       # All arguments can be set to 0 to use the default devices values.
+       # `width` and `height` must both be set to 0 or have significant values.
+       #
+       # `format` is a value specified by EGL.
+       fun set_buffers_geometry(width, height, format: Int): Bool `{
+               return ANativeWindow_setBuffersGeometry(self, (int32_t)width, (int32_t)height, (int32_t)format);
+       `}
 end