diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-03-07 23:01:50 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-03-07 23:01:50 +0000 |
| commit | 626ecbfca04e95bcb42390827112b2d7de1c903f (patch) | |
| tree | 873aab5aa0fddb698b9f510d7fe302a886951fab /src/drivers/Android | |
| parent | 2e5b983f4b3da87bf28319fe7ab99bb6206f0411 (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 'src/drivers/Android')
| -rw-r--r-- | src/drivers/Android/Fl_Android_Screen_Driver.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/drivers/Android/Fl_Android_Screen_Driver.cxx b/src/drivers/Android/Fl_Android_Screen_Driver.cxx index 9156d8c83..be2c94248 100644 --- a/src/drivers/Android/Fl_Android_Screen_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Screen_Driver.cxx @@ -59,11 +59,22 @@ Fl_Screen_Driver *Fl_Screen_Driver::newScreenDriver() return new Fl_Android_Screen_Driver(); } + +extern int fl_send_system_handlers(void *e); + int Fl_Android_Screen_Driver::handle_app_command() { + // get the command int8_t cmd = Fl_Android_Application::read_cmd(); + + // setup the Android glue and prepare all settings for calling into FLTK Fl_Android_Application::pre_exec_cmd(cmd); - // TODO: call Fl::handle() with event parametrs set + + // call all registered FLTK system handlers + Fl::e_number = ((uint32_t)cmd-APP_CMD_INPUT_CHANGED) + FL_ANDROID_EVENT_INPUT_CHANGED; + fl_send_system_handlers(0L); + + // fixup and finalize application wide command handling Fl_Android_Application::post_exec_cmd(cmd); return 1; } |
