summaryrefslogtreecommitdiff
path: root/ide/AndroidStudio3/app
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2018-03-07 23:01:50 +0000
committerMatthias Melcher <fltk@matthiasm.com>2018-03-07 23:01:50 +0000
commit626ecbfca04e95bcb42390827112b2d7de1c903f (patch)
tree873aab5aa0fddb698b9f510d7fe302a886951fab /ide/AndroidStudio3/app
parent2e5b983f4b3da87bf28319fe7ab99bb6206f0411 (diff)
Android: specific event for Android. Use Fl::add_system_handler() and Fl::event(), for example: FL_ANDROID_EVENT_LOW_MEMORY
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12720 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'ide/AndroidStudio3/app')
-rw-r--r--ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx
index 3c99fb148..911683944 100644
--- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx
+++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx
@@ -15,6 +15,7 @@
*
*/
+#include <src/drivers/Android/Fl_Android_Application.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include <FL/Enumerations.H>
@@ -22,8 +23,15 @@
Fl_Window *win;
Fl_Button *btn;
+int h(void*, void*)
+{
+ Fl_Android_Application::log_w("App global even %p", Fl::event());
+ return 0;
+}
+
int main(int argc, char **argv)
{
+ Fl::add_system_handler(h, 0);
win = new Fl_Window(10, 10, 600, 400, "Hallo");
btn = new Fl_Button(190, 200, 280, 35, "Hello, Android!");
btn->color(FL_LIGHT2);