3 Copyright (C) 2014 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #error this include has to be included on android port only!
27 #include <android_native_app_glue.h>
28 #include <android/log.h>
34 extern android_app *app_global;
36 /** java <-> c++ interaction interface **/
37 extern JNIEnv *jnienv;
40 * do initialization required on android only
43 void cleanupAndroid();
46 * Initializes path_* variables for Android
47 * @param env Android JNI environment
49 void initializePathsAndroid();
52 * show text input dialog in java
53 * @param acceptButton text to display on accept button
54 * @param hint hint to show
55 * @param current initial value to display
56 * @param editType type of texfield
57 * (1==multiline text input; 2==single line text input; 3=password field)
59 void showInputDialog(const std::string& acceptButton,
60 const std::string& hint, const std::string& current, int editType);
63 * WORKAROUND for not working callbacks from java -> c++
64 * get current state of input dialog
66 int getInputDialogState();
69 * WORKAROUND for not working callbacks from java -> c++
70 * get text in current input dialog
72 std::string getInputDialogValue();
75 float getDisplayDensity();
76 v2u32 getDisplaySize();