diff options
author | ptyl@cloudon.com <ptyl@cloudon.com> | 2013-09-11 16:25:04 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-10-11 08:19:50 +0000 |
commit | da69a3ef5c395a3772a1c999aae5f172fc139d1e (patch) | |
tree | 11109b44c56e8243d2aa8bef30baebd93a41d061 /vcl/ios | |
parent | 0fa78319a8148cf1e0d200dac1cabbe7fdd47d3a (diff) |
iOS experimental app support for selection marking via long press gesture
Change-Id: Ib7a71797a2dc967f9d8ddd60fdc10c78201a87c8
Reviewed-on: https://gerrit.libreoffice.org/5911
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/ios')
-rw-r--r-- | vcl/ios/iosinst.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index e7cec9f9d046..3605288f026e 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -426,6 +426,34 @@ void lo_tap(int x, int y) } extern "C" +void lo_mouse_drag(int x, int y, LOMouseButtonState state) +{ + SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame(); + + if (pFocus) { + MouseEvent aEvent; + sal_uLong nEvent; + + switch(state) { + case DOWN: + aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLECLICK, MOUSE_LEFT); + nEvent = VCLEVENT_WINDOW_MOUSEBUTTONDOWN; + break; + case MOVE: + aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLEMOVE, MOUSE_LEFT); + nEvent = VCLEVENT_WINDOW_MOUSEMOVE; + break; + case UP: + aEvent = MouseEvent(Point(x, y), 1, MOUSE_SIMPLECLICK, MOUSE_LEFT); + nEvent = VCLEVENT_WINDOW_MOUSEBUTTONUP; + break; + } + + Application::PostMouseEvent(nEvent, pFocus->GetWindow(), &aEvent); + } +} + +extern "C" void lo_pan(int deltaX, int deltaY) { SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame(); |