summaryrefslogtreecommitdiff
path: root/vcl/ios
diff options
context:
space:
mode:
authorptyl@cloudon.com <ptyl@cloudon.com>2013-09-01 19:22:23 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-09 14:37:46 +0000
commit4e7495ac2cb6b015ad492def45fd24f4ba0f54f8 (patch)
treea23c409bd5bf2f2a54a26a50b4c7e29054af666d /vcl/ios
parentff3b823ef4b867263711703fab596584314e4f58 (diff)
Fix for iOS scroll by pixels, and pinch to zoom
Minor further changes by tml to match the coding style of surrounding code mainly. Change-Id: Ied6087a264f1c6b00763ea36fba9808329afede4 Reviewed-on: https://gerrit.libreoffice.org/5742 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/ios')
-rw-r--r--vcl/ios/iosinst.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx
index dd92c6e5af2c..e7cec9f9d046 100644
--- a/vcl/ios/iosinst.cxx
+++ b/vcl/ios/iosinst.cxx
@@ -426,17 +426,28 @@ void lo_tap(int x, int y)
}
extern "C"
-void lo_pan(int x, int y)
+void lo_pan(int deltaX, int deltaY)
{
SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame();
if (pFocus) {
- SAL_INFO( "vcl.ios", "scroll: " << "(" << x << "," << y << ")" );
- ScrollEvent aEvent( x, y );
+ SAL_INFO( "vcl.ios", "pan delta: " << "(" << deltaX << "," << deltaY << ") ");
+ ScrollEvent aEvent( deltaX, deltaY );
Application::PostScrollEvent(VCLEVENT_WINDOW_SCROLL, pFocus->GetWindow(), &aEvent);
}
}
extern "C"
+void lo_zoom(int x, int y, float scale)
+{
+ SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame();
+ if (pFocus) {
+ SAL_INFO( "vcl.ios", "pinch: " << "(" << scale << ") ");
+ ZoomEvent aEvent( Point(x,y), scale);
+ Application::PostZoomEvent(VCLEVENT_WINDOW_ZOOM, pFocus->GetWindow(), &aEvent);
+ }
+}
+
+extern "C"
void lo_keyboard_input(int c)
{
SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame();