diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-28 19:59:37 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-30 07:53:37 +0200 |
commit | d7b027bd101a26a6513736dcd71a07125fded251 (patch) | |
tree | d791eb58cda042eee44ca407ef8d1a1b3b2ba925 | |
parent | 46675c06fe6db13af1e44660a619b956277f74cf (diff) |
Add lo_tap()
Change-Id: I635be54c27c93de0a11be7bdd01979b99dadda28
-rw-r--r-- | sal/inc/osl/detail/ios-bootstrap.h | 1 | ||||
-rw-r--r-- | vcl/ios/iosinst.cxx | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h index 4738f28a054b..08cb267f4a6c 100644 --- a/sal/inc/osl/detail/ios-bootstrap.h +++ b/sal/inc/osl/detail/ios-bootstrap.h @@ -44,6 +44,7 @@ void lo_damaged(); void lo_runMain(); void lo_set_view_size(int width, int height); void lo_render_windows(char *pixelBuffer, int width, int height); +void lo_tap(int x, int y); #ifdef __cplusplus } diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index 71dda58fcf7a..f0c15421bd08 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -312,4 +312,21 @@ void lo_render_windows(char *pixelBuffer, int width, int height) IosSalInstance::getInstance()->RedrawWindows(pixelBuffer, width, height, 0, 0, width, height); } +extern "C" +void lo_tap(int x, int y) +{ + SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame(); + if (pFocus) { + MouseEvent aEvent; + sal_uLong nEvent; + + aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLECLICK, MOUSE_LEFT); + nEvent = VCLEVENT_WINDOW_MOUSEBUTTONDOWN; + Application::PostMouseEvent(nEvent, pFocus->GetWindow(), &aEvent); + + nEvent = VCLEVENT_WINDOW_MOUSEBUTTONUP; + Application::PostMouseEvent(nEvent, pFocus->GetWindow(), &aEvent); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |