From 626ecbfca04e95bcb42390827112b2d7de1c903f Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 7 Mar 2018 23:01:50 +0000 Subject: 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 --- ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ide') 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 #include #include #include @@ -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); -- cgit v1.2.3