aboutsummaryrefslogtreecommitdiff
path: root/examples/01.HelloWorld_Android/android_tools.h
diff options
context:
space:
mode:
authorcutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-01-03 19:05:16 +0000
committercutealien <cutealien@dfc29bdd-3216-0410-991c-e03cc46cb475>2020-01-03 19:05:16 +0000
commit2ae2a551a6290f46734307bbfdafea4b1a2cf2ba (patch)
treeba2f0b468640e44899fed3df2d4cc58795f4a003 /examples/01.HelloWorld_Android/android_tools.h
downloadirrlicht-2ae2a551a6290f46734307bbfdafea4b1a2cf2ba.tar.xz
Merging r5975 through r6036 from trunk to ogl-es branch.
GLES drivers adapted, but only did make compile-tests. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6038 dfc29bdd-3216-0410-991c-e03cc46cb475
Diffstat (limited to 'examples/01.HelloWorld_Android/android_tools.h')
-rw-r--r--examples/01.HelloWorld_Android/android_tools.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/examples/01.HelloWorld_Android/android_tools.h b/examples/01.HelloWorld_Android/android_tools.h
new file mode 100644
index 0000000..2a3d66f
--- /dev/null
+++ b/examples/01.HelloWorld_Android/android_tools.h
@@ -0,0 +1,33 @@
+// This file is part of the "Irrlicht Engine".
+// For conditions of distribution and use, see copyright notice in irrlicht.h
+
+#ifndef __IRR_ANDROID_TOOLS_H__
+#define __IRR_ANDROID_TOOLS_H__
+
+#include <irrlicht.h>
+#include <android_native_app_glue.h>
+
+namespace irr
+{
+namespace android
+{
+
+struct SDisplayMetrics
+{
+ irr::s32 widthPixels;
+ irr::s32 heightPixels;
+ irr::f32 density;
+ irr::s32 densityDpi;
+ irr::f32 scaledDensity;
+ irr::f32 xdpi;
+ irr::f32 ydpi;
+};
+
+//! Access SDisplayMetrics
+extern bool getDisplayMetrics(android_app* app, SDisplayMetrics & metrics);
+
+extern void setSoftInputVisibility(android_app* app, bool visible);
+}
+}
+
+#endif // __IRR_ANDROID_TOOLS_H__