diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-06-21 17:02:47 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-06-21 17:02:47 +0000 |
| commit | 333e718ae735411fec220334256360b8e3b4b1bb (patch) | |
| tree | e3d5a504565f1f2bdd461e7e9c90ae454dc62a5f /src/drivers/Android/Fl_Android_Screen_Driver.cxx | |
| parent | 22c21fa8401b6e433611258a703a0d7eda64584a (diff) | |
Android: Windows are now centered on screen if no position is defined, dialogs pop up in a more logical position.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12958 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Android/Fl_Android_Screen_Driver.cxx')
| -rw-r--r-- | src/drivers/Android/Fl_Android_Screen_Driver.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/drivers/Android/Fl_Android_Screen_Driver.cxx b/src/drivers/Android/Fl_Android_Screen_Driver.cxx index 060cda304..4a9674a2b 100644 --- a/src/drivers/Android/Fl_Android_Screen_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Screen_Driver.cxx @@ -483,6 +483,27 @@ void Fl_Android_Screen_Driver::beep(int type) } +/** + * Get the current mouse coordinates. + * + * This is used, among other things, to position the FLTK standard dialogs in + * a way that makes it easy to click the most common button. For an Android + * touch screen, this makes no sense at all, which is why we return the center + * of the screen for now. + * + * TODO: rethink the dialog positioning scheme for touch devices. + * + * @param [out] x + * @param [out] y + * @return + */ +int Fl_Android_Screen_Driver::get_mouse(int &x, int &y) +{ + x = 600/2; + y = 800/2; + return 1; +} + // // End of "$Id$". // |
